From 524a901deaadeb10f8a7b727659cf7a18a9dda1c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:33:12 -0700 Subject: [PATCH 01/19] Update All go.opentelemetry.io/collector packages to v0.106.1 (#10762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![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](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.106.0` -> `v0.106.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter/v0.106.0/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter/v0.106.0/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.106.0` -> `v0.106.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.106.0/v0.106.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.106.0/v0.106.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
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter) ### [`v0.106.1`](https://togithub.com/open-telemetry/opentelemetry-collector/releases/tag/v0.106.1) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.106.0...v0.106.1) ##### Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.106.1 ##### End User Changelog ##### v0.106.1 ##### 🧰 Bug fixes 🧰 - `configauth`: Fix unmarshaling of authentication in HTTP servers. ([#​10750](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10750))
--- ### 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 was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- exporter/exporterprofiles/go.mod | 2 +- processor/processorprofiles/go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exporter/exporterprofiles/go.mod b/exporter/exporterprofiles/go.mod index 5f883f042f3..671b966730f 100644 --- a/exporter/exporterprofiles/go.mod +++ b/exporter/exporterprofiles/go.mod @@ -6,7 +6,7 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.106.1 go.opentelemetry.io/collector/consumer/consumertest v0.106.1 - go.opentelemetry.io/collector/exporter v0.106.0 + go.opentelemetry.io/collector/exporter v0.106.1 ) require ( diff --git a/processor/processorprofiles/go.mod b/processor/processorprofiles/go.mod index 49d09def1d6..36416c45010 100644 --- a/processor/processorprofiles/go.mod +++ b/processor/processorprofiles/go.mod @@ -7,7 +7,7 @@ require ( go.opentelemetry.io/collector/component v0.106.1 go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 go.opentelemetry.io/collector/consumer/consumertest v0.106.1 - go.opentelemetry.io/collector/processor v0.106.0 + go.opentelemetry.io/collector/processor v0.106.1 ) require ( From af92ca87d82026e700c29eea922f23e3a8aff2dc Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Wed, 31 Jul 2024 10:42:04 +0200 Subject: [PATCH 02/19] [chore] Explicitly note that service and otelcol are not part of 1.0 (#10643) #### Description Explicitly excludes service and otelcol from 1.0 efforts. These modules are useful for distribution maintainers but not end-users, for which the 1.0 effort is targeted. --- docs/ga-roadmap.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ga-roadmap.md b/docs/ga-roadmap.md index 37928f8edc3..1e3502c0139 100644 --- a/docs/ga-roadmap.md +++ b/docs/ga-roadmap.md @@ -38,6 +38,7 @@ Additionally, when considering bug reports we will prioritize: 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 + * This explicitly excludes the `service` and `otelcol` modules, for which we will only guarantee that there are no breaking changes impacting end-users of the binary after 1.0, while Go API only changes will continue to be admissible until these modules are tagged as 1.0. * Collector Builder * telemetrygen * mdatagen From ea2940d49a6e4c48bb658a66e927bccebdbf9d96 Mon Sep 17 00:00:00 2001 From: "John L. Peterson (Jack)" Date: Wed, 31 Jul 2024 05:03:25 -0400 Subject: [PATCH 03/19] minor grammar and spelling improvements to CONTRIBUTING.md (#10760) #### Documentation Minor spelling and grammar clarification suggestions for the contribution guide. Added a link where relevant, as well --- CONTRIBUTING.md | 136 ++++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 69 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 513ec84462d..788d092053c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ End-users are the target audience for our binary distributions, as made availabl [opentelemetry-collector-releases](https://github.com/open-telemetry/opentelemetry-collector-releases) repository, as well as distributions created using the [OpenTelemetry Collector Builder](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder). To them, stability in the -behavior is important, be it runtime, configuration or [internal +behavior is important, be it runtime, configuration, or [internal telemetry](https://opentelemetry.io/docs/collector/internal-telemetry/). They are more numerous and harder to get in touch with, making our changes to the Collector more disruptive to them than to other audiences. As a general rule, whenever you are developing OpenTelemetry Collector components (extensions, receivers, processors, exporters, @@ -30,7 +30,7 @@ have an impact on this audience. Make sure to cause minimal disruption when doin ### Component developers -Component developers create new extensions, receivers, processors, exporters and connectors to be used with the +Component developers create new extensions, receivers, processors, exporters, and connectors to be used with the OpenTelemetry Collector. They are the primary audience for the opentelemetry-collector repository's public Go API. A significant part of them will contribute to opentelemetry-collector-contrib. In addition to the end-user aspect mentioned above, this audience also cares about Go API compatibility of Go modules such as the ones in the `pdata`, @@ -42,7 +42,7 @@ affecting this audience. A third audience uses the OpenTelemetry Collector as a library to build their own distributions or other projects based on the Collector. This audience is the main consumer of modules such as `service` or `otelcol`. They also share the same -concerns as component developers regarding Go API compatibility, and are also interested in behavior stability. These +concerns as component developers regarding Go API compatibility and are likewise interested in behavior stability. These are our most advanced users and are the most equipped to deal with disruptive changes. ## How to structure PRs to get expedient reviews? @@ -53,11 +53,11 @@ reasonably fast reviews. ### When adding a new component -Components refer to connectors, exporters, extensions, processors, and receivers. The key criteria to implementing a component is to: +Components refer to connectors, exporters, extensions, processors, and receivers. The key criteria for implementing a component is to: * Implement the `component.Component` interface * Provide a configuration structure which defines the configuration of the component -* Provide the implementation which performs the component operation +* Provide the implementation that performs the component operation For more details on components, see the [Adding New Components](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-new-components) document and the tutorial [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) which provides a detailed example of building a component. @@ -66,13 +66,13 @@ When adding a new component to the OpenTelemetry Collector, ensure that any conf When submitting a component to the community, consider breaking it down into separate PRs as follows: * **First PR** should include the overall structure of the new component: - * Readme, configuration, and factory implementation usually using the helper + * Readme, configuration, and factory implementation should usually use the helper factory structs. * This PR is usually trivial to review, so the size limit does not apply to it. * The component should use [`In Development` Stability](https://github.com/open-telemetry/opentelemetry-collector#development) in its README. * **Second PR** should include the concrete implementation of the component. If the - size of this PR is larger than the recommended size consider splitting it in + size of this PR is larger than the recommended size consider splitting it into multiple PRs. * **Last PR** should mark the new component as `Alpha` stability and add it to the `otelcorecol` binary by updating the `otelcorecol/components.go` file. The component must be enabled @@ -88,21 +88,21 @@ Any refactoring work must be split in its own PR that does not include any behavior changes. It is important to do this to avoid hidden changes in large and trivial refactoring PRs. -## Report a bug or requesting feature +## Report a bug or request a feature Reporting bugs is an important contribution. Please make sure to include: * Expected and actual behavior -* OpenTelemetry version you are running +* The OpenTelemetry version you are running * If possible, steps to reproduce ## How to contribute ### Before you start -Please read project contribution +Please read the project contribution [guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md) -for general practices for OpenTelemetry project. +for general practices for the OpenTelemetry project. Select a good issue from the links below (ordered by difficulty/complexity): @@ -154,7 +154,7 @@ have to contend with conflicts in `main`. Please also see [GitHub workflow](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md#github-workflow) -section of general project contributing guide. +section of the general project contributing guide. ## Required Tools @@ -167,7 +167,7 @@ Working with the project sources requires the following tools: ## Repository Setup -Fork the repo, checkout the upstream repo to your GOPATH by: +Fork the repo and checkout the upstream repo to your GOPATH by: ``` $ git clone git@github.com:open-telemetry/opentelemetry-collector.git @@ -180,7 +180,7 @@ $ cd opentelemetry-collector $ git remote add fork git@github.com:YOUR_GITHUB_USERNAME/opentelemetry-collector.git ``` -Run tests, fmt and lint: +Run tests, fmt, and lint: ```shell $ make @@ -214,7 +214,7 @@ concatenate all commit messages right before you hit the "Confirm squash and mer button. Maintainers must make sure to edit this concatenated message to make it right before merging. In some cases, if the commit messages are lacking the easiest approach to have at least something useful is copy/pasting the PR description into the commit message box -before merging (but see above paragraph about writing good commit messages in the first place). +before merging (but see the above paragraph about writing good commit messages in the first place). ## General Notes @@ -239,19 +239,19 @@ To keep naming patterns consistent across the project, naming patterns are enfor - `func NewKinesisExporter(kpl aws.KinesisProducerLibrary)` allocates a variable that uses the variables passed on creation. - `func NewKeyValueBuilder()` SHOULD allocate internal variables to a safe zero value. -- Methods that return a variable that uses non zero value(s) that impacts business logic MUST use the prefix `NewDefault`. For example: +- Methods that return a variable that uses non-zero value(s) that impacts business logic MUST use the prefix `NewDefault`. For example: - `func NewDefaultKinesisConfig()` would return a configuration that is the suggested default - and can be updated without concern of a race condition. -- Methods that act upon an input variable MUST have a signature that reflect concisely the logic being done. For example: + and can be updated without concern of causing a race condition. +- Methods that act upon an input variable MUST have a signature that reflects concisely the logic being done. For example: - `func FilterAttributes(attrs []Attribute, match func(attr Attribute) bool) []Attribute` MUST only filter attributes out of the passed input slice and return a new slice with values that `match` returns true. It may not do more work than what the method name implies, ie, it must not key a global history of all the slices that have been filtered. -- Methods that get the value of a field i.e. a getterMethod MUST use uppercase first alphabet and NOT `get` prefix. For example: - - `func (p *Person) Name() string {return p.name} ` Name (with an uppercase N,exported) method is used here to get the value of the name field and not `getName`.The use of upper-case names for export provides the hook to discriminate the field from the method. +- Methods that get the value of a field i.e. a getterMethod MUST use an uppercase first letter and NOT a `get` prefix. For example: + - `func (p *Person) Name() string {return p.name} ` Name (with an uppercase N, exported) method is used here to get the value of the name field and not `getName`.The use of upper-case names for export provides the hook to discriminate the field from the method. - Methods that set the value of a field i.e. a setterMethod MUST use a `set` prefix. For example: - `func (p *Person) SetName(newName string) {p.name = newName}` SetName method here sets the value of the name field. - Variable assigned in a package's global scope that is preconfigured with a default set of values MUST use `Default` as the prefix. For example: - - `var DefaultMarshallers = map[string]pdata.Marshallers{...}` is defined with an exporters package that allows for converting an encoding name, + - `var DefaultMarshallers = map[string]pdata.Marshallers{...}` is defined with an exporter package that allows for converting an encoding name, `zipkin`, and return the preconfigured marshaller to be used in the export process. - Types that are specific to a signal MUST be worded with the signal used as an adjective, i.e. `SignalType`. For example: - `type TracesSink interface {...}` @@ -268,7 +268,7 @@ To keep naming patterns consistent across the project, enumeration patterns are - 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 +- The enumeration name should succinctly describe its 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: @@ -278,20 +278,19 @@ To keep naming patterns consistent across the project, enumeration patterns are ### Recommended Libraries / Defaults -In order to simplify developing within the project, library recommendations have been set -and should be followed. +In order to simplify development within the project, we have made certain library recommendations that should be followed. | Scenario | Recommended | Rationale | |------------|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| -| Hashing | ["hashing/fnv"](https://pkg.go.dev/hash/fnv) | The project adopted this as the default hashing method due to the efficiency and is reasonable for non cryptographic use | -| Testing | Use `t.Parallel()` where possible | Enabling more test to be run in parallel will speed up the feedback process when working on the project. | +| Hashing | ["hashing/fnv"](https://pkg.go.dev/hash/fnv) | The project adopted this as the default hashing method due to the efficiency and is reasonable for non-cryptographic use | +| Testing | Use `t.Parallel()` where possible | Enabling more tests to be run in parallel will speed up the feedback process when working on the project. | -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. +Within the project, there are some packages that have yet to follow the recommendations and are being addressed. 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. +To guarantee backward-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. @@ -319,7 +318,7 @@ and process termination. Do not crash or exit the Collector process after the startup sequence is finished. A running Collector typically contains data that is received but not yet exported further -(e.g. is stored in the queues and other processors). Crashing or exiting the Collector +(e.g. data that is stored in the queues and other processors). Crashing or exiting the Collector process will result in losing this data since typically the receiver has already acknowledged the receipt for this data and the senders of the data will not send that data again. @@ -329,17 +328,17 @@ not send that data again. Do not crash on bad input in receivers or elsewhere in the pipeline. [Crash-only software](https://en.wikipedia.org/wiki/Crash-only_software) is valid in certain cases; however, this is not a correct approach for Collector (except -during startup, see above). The reason is that many senders from which Collector +during startup, see above). The reason is that many senders from which the Collector receives data have built-in automatic retries of the _same_ data if no acknowledgment is received from the Collector. If you crash on bad input chances are high that after the Collector is restarted it will see the same -data in the input and will crash again. This will likely result in infinite +data in the input and will crash again. This will likely result in an infinite crashing loop if you have automatic retries in place. Typically bad input when detected in a receiver should be reported back to the sender. If it is elsewhere in the pipeline it may be too late to send a response to the sender (particularly in processors which are not synchronously processing -data). In either case it is recommended to keep a metric that counts bad input data. +data). In either case, it is recommended to keep a metric that counts bad input data. ### Error Handling and Retries @@ -350,25 +349,25 @@ provide visibility to users of the Collector. For transient errors come up with retrying strategy and implement it. Typically you will want to implement retries with some sort of exponential back-off strategy. For connection or sending retries use jitter for back-off intervals to avoid overwhelming -your destination when network is restored or the destination is recovered. +your destination when the network is restored or the destination is recovered. [Exponential Backoff](https://github.com/cenkalti/backoff) is a good library that provides all this functionality. ### Logging Log your component startup and shutdown, including successful outcomes (but don't -overdo it, keep the number of success message to a minimum). +overdo it, and keep the number of success messages to a minimum). This can help to understand the context of failures if they occur elsewhere after your code is successfully executed. Use logging carefully for events that can happen frequently to avoid flooding the logs. Avoid outputting logs per a received or processed data item since this can -amount to very large number of log entries (Collector is designed to process +amount to a very large number of log entries (Collector is designed to process many thousands of spans and metrics per second). For such high-frequency events -instead of logging consider adding an internal metric and increment it when +instead of logging consider adding an internal metric and incrementing it when the event happens. -Make log message human readable and also include data that is needed for easier +Make log messages human readable and also include data that is needed for easier understanding of what happened and in what context. ### Executing External Processes @@ -382,12 +381,12 @@ The following limitations are recommended: - If an external process needs to be executed limit and hard-code the location where the executable file may be located, instead of allowing the input to dictate the full path to the executable. -- If possible limit the name of the executable file to be one from a hard-coded +- If possible limit the name of the executable file to be pulled from a hard-coded list defined at compile time. - If command line arguments need to be passed to the process do not take the arguments from the user input directly. Instead, compose the command line arguments indirectly, if necessary, deriving the value from the user input. Limit as much as possible the - possible space of values for command line arguments. + size of the possible space of values for command line arguments. ### Observability @@ -476,15 +475,15 @@ tsp.telemetry.ProcessorTailsamplingSamplingdecisionLatency.Record(ctx, ...) ### Resource Usage -Limit usage of CPU, RAM or other resources that the code can use. Do not write code -that consumes resources in an uncontrolled manner. For example if you have a queue +Limit usage of CPU, RAM, and other resources that the code can use. Do not write code +that consumes resources in an uncontrolled manner. For example, if you have a queue that can contain unprocessed messages always limit the size of the queue unless you have other ways to guarantee that the queue will be consumed faster than items are added to it. Performance test the code for both normal use-cases under acceptable load and also for -abnormal use-cases when the load exceeds acceptable many times. Ensure that -your code performs predictably under abnormal use. For example if the code +abnormal use-cases when the load exceeds acceptable limits many times over. Ensure that +your code performs predictably under abnormal use. For example, if the code needs to process received data and cannot keep up with the receiving rate it is not acceptable to keep allocating more memory for received data until the Collector runs out of memory. Instead have protections for these situations, e.g. when hitting @@ -503,7 +502,7 @@ operation can take. ### Unit Tests Cover important functionality with unit tests. We require that contributions -do not decrease overall code coverage of the codebase - this is aligned with our +do not decrease the overall code coverage of the codebase - this is aligned with our goal to increase coverage over time. Keep track of execution time for your unit tests and try to keep them as short as possible. @@ -525,22 +524,22 @@ a local version. In their absence, it is strongly advised to mock the integratio ### Using CGO Using CGO is prohibited due to the lack of portability and complexity -that comes with managing external libaries with different operating systems and configurations. +that comes with managing external libraries with different operating systems and configurations. However, if the package MUST use CGO, this should be explicitly called out within the readme with clear instructions on how to install the required libraries. -Furthermore, if your package requires CGO, it MUST be able to compile and operate in a no op mode +Furthermore, if your package requires CGO, it MUST be able to compile and operate in a no-op mode or report a warning back to the collector with a clear error saying CGO is required to work. ### Breaking changes -Whenever possible, we adhere to semver as our minimum standards. Even before v1, we strive to not break compatibility +Whenever possible, we adhere to [semver](https://semver.org/) as our minimum standards. Even before v1, we strive not to break compatibility without a good reason. Hence, when a change is known to cause a breaking change, it MUST be clearly marked in the -changelog, and SHOULD include a line instructing users how to move forward. +changelog and SHOULD include a line instructing users how to move forward. We also strive to perform breaking changes in two stages, deprecating it first (`vM.N`) and breaking it in a subsequent version (`vM.N+1`). -- when we need to remove something, we MUST mark a feature as deprecated in one version, and MAY remove it in a +- when we need to remove something, we MUST mark a feature as deprecated in one version and MAY remove it in a subsequent one - when renaming or refactoring types, functions, or attributes, we MUST create the new name and MUST deprecate the old one in one version (step 1), and MAY remove it in a subsequent version (step 2). For simple renames, the old name @@ -566,7 +565,7 @@ gate](https://github.com/open-telemetry/opentelemetry-collector/blob/6b5a3d08a96 in a subsequent version, and eventually removing it after yet another version. This is how it would look like, considering that each of the following steps is done in a separate version: -1. Mark the feature as deprecated, add a short lived feature gate with the feature enabled by default +1. Mark the feature as deprecated, add a short-lived feature gate with the feature enabled by default 1. Change the feature gate to disable the feature by default, deprecating the gate at the same time 1. Remove the feature and the gate @@ -581,7 +580,7 @@ that each of the following steps is done in a separate version: #### Example #2 - Changing the return values of a function 1. Current version `v0.N` has `func GetFoo() Foo` -1. We now need to also return an error. We do it by creating a new function that will be equivalent to the existing one, +1. We now need to also return an error. We do it by creating a new function that will be equivalent to the existing one so that current users can easily migrate to that: `func MustGetFoo() Foo`, which panics on errors. We release this in `v0.N+1`, deprecating the existing `func GetFoo() Foo` with it, adding an entry to the changelog and perhaps a log entry with a warning. @@ -590,11 +589,11 @@ that each of the following steps is done in a separate version: #### Example #3 - Changing the arguments of a function 1. Current version `v0.N` has `func GetFoo() Foo` -1. We now decided to do something that might be blocking as part of `func GetFoo() Foo`, so, we start accepting a +2. We now decide to do something that might be blocking as part of `func GetFoo() Foo`, so, we start accepting a context: `func GetFooWithContext(context.Context) Foo`. We release this in `v0.N+1`, deprecating the existing `func GetFoo() Foo` with it, adding an entry to the changelog and perhaps a log entry with a warning. The existing `func GetFoo() Foo` is changed to call `func GetFooWithContext(context.Background()) Foo`. -1. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if +3. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if needed. #### Exceptions @@ -615,9 +614,9 @@ for the following situations. Note that these changes should still be recorded a ##### Alpha components Configuration for alpha components can be changed with minimal notice. Documenting them as part of the changelog is -sufficient. We still recommend giving users one or two minor version's notice before breaking the configuration, such as +sufficient. We still recommend giving users one or two minor versions' notice before breaking the configuration, such as when removing or renaming a configuration option. Providing a migration path in the component's repository is NOT -required for alpha components, although still recommended. +required for alpha components, although it is still recommended. - when adding a new configuration option, components MAY mark the new option as required and are not required to provide a reasonable default. @@ -642,15 +641,15 @@ When renaming or removing a configuration option: - the option MUST be deprecated in one version - a WARN level message should be logged, with a link to a place within the component's repository where the change is documented and a migration path is provided -- the option MUST be kept for at least N+1 version, and MAY be hidden behind a feature gate in N+2 +- the option MUST be kept for at least N+1 version and MAY be hidden behind a feature gate in N+2 - the option and the WARN level message MAY be removed after N+2 or 6 months, whichever comes later Additionally, when removing an option: -- the option MAY be made non operational already by the same version where it is deprecated +- the option MAY be made non-operational already by the same version where it is deprecated ##### Stable components -Stable component MUST be compatible between minor versions, unless critical security issues are found. In that case, the +Stable components MUST be compatible between minor versions unless critical security issues are found. In that case, the component owner MUST provide a migration path and a reasonable time frame for users to upgrade. The same rules from beta components apply to stable when it comes to configuration changes. @@ -659,7 +658,7 @@ components apply to stable when it comes to configuration changes. The [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification) can be a rapidly moving target at times. While it may seem efficient to get an early start on implementing new features or functionality under development in the specification, this can also lead to significant churn and a risk that -changes in the specification can result in breaking changes to the implementation. For this reason it is the +changes in the specification can result in breaking changes to the implementation. For this reason, it is the policy of the Collector SIG to not implement, or accept implementations of, new or changed specification language prior to inclusion in a stable release of the specification. @@ -682,20 +681,20 @@ An entry into the changelog is required for the following reasons: - New components being added - Changes to exported elements of a package -It is reasonable to omit an entry to the changelog under these circuimstances: +It is reasonable to omit an entry to the changelog under these circumstances: - Updating test to remove flakiness or improve coverage - Updates to the CI/CD process - Updates to internal packages -If there is some uncertainty with regards to if a changelog entry is needed, the recomendation is to create +If there is some uncertainty with regards to if a changelog entry is needed, the recommendation is to create an entry to in the event that the change is important to the project consumers. ### Adding a Changelog Entry The [CHANGELOG.md](./CHANGELOG.md) and [CHANGELOG-API.md](./CHANGELOG-API.md) files in this repo is autogenerated from `.yaml` files in the `./.chloggen` directory. -Your pull-request should add a new `.yaml` file to this directory. The name of your file must be unique since the last release. +Your pull request should add a new `.yaml` file to this directory. The name of your file must be unique since the last release. During the collector release process, all `./chloggen/*.yaml` files are transcribed into `CHANGELOG.md` and `CHANGELOG-API.md` and then deleted. @@ -705,14 +704,14 @@ During the collector release process, all `./chloggen/*.yaml` files are transcri 3. Run `make chlog-validate` to ensure the new file is valid 4. Commit and push the file -Alternately, copy `./.chloggen/TEMPLATE.yaml`, or just create your file from scratch. +Alternatively, copy `./.chloggen/TEMPLATE.yaml`, or just create your file from scratch. ## Release See [release](docs/release.md) for details. ## Contributing Images -If you are adding any new images, please use [Excalidraw](https://excalidraw.com). It's a free and open source web application and doesn't require any account to get started. Once you've created the design, while exporting the image, make sure to tick **"Embed scene into exported file"** option. This allows the image to be imported in an editable format for other contributors later. +If you are adding any new images, please use [Excalidraw](https://excalidraw.com). It's a free and open-source web application and doesn't require any account to get started. Once you've created the design, while exporting the image, make sure to tick **"Embed scene into exported file"** option. This allows the image to be imported in an editable format for other contributors later. ## Common Issues @@ -755,7 +754,7 @@ However, there are many valid justifications for implementing a standalone repo- 1. The target naturally applies to the repo as a whole. (e.g. Building the collector.) 2. Interaction between modules would be problematic. 3. A necessary tool does not provide a mechanism for scoping its application. (e.g. `porto` cannot be limited to a specific module.) -4. The "for each module" pattern would result in incomplete coverage of the codebase. (e.g. A target that scans all file, not just `.go` files.) +4. The "for each module" pattern would result in incomplete coverage of the codebase. (e.g. A target that scans all files, not just `.go` files.) #### Default targets @@ -781,9 +780,8 @@ When a new OTLP version is published, the following steps are required to update ## Exceptions -While the rules in this and other documents in this repository is what we strive to follow, we acknowledge that rules may be -unfeasible to be applied in some situations. Exceptions to the rules +While the rules in this and other documents in this repository are what we strive to follow, we acknowledge that it may be unfeasible to apply these rules in some situations. Exceptions to the rules on this and other documents are acceptable if consensus can be obtained from approvers in the pull request they are proposed. A reason for requesting the exception MUST be given in the pull request. Until unanimity is obtained, approvers and maintainers are -encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be obtained, the maintainers are then tasked in getting a -decision using its regular means (voting, TC help, ...). +encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be obtained, the maintainers' group is then tasked with making a +decision using its regular means (voting, TC help, etc.). From 75fd25916ddf0f1bec29298ab84a6473e711f17d Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Wed, 31 Jul 2024 14:19:40 +0200 Subject: [PATCH 04/19] Add profile support in receiver (#10690) #### Description This follows https://github.com/open-telemetry/opentelemetry-collector/pull/10530, and adds profiles support into receivers. #### Link to tracking issue See https://github.com/open-telemetry/opentelemetry-collector/pull/10375 cc @mx-psi --------- Co-authored-by: Pablo Baeyens --- .chloggen/profiles-receiver.yaml | 25 +++++ receiver/go.mod | 2 +- receiver/internal/factory.go | 38 +++++++ receiver/internal/profiles.go | 15 +++ receiver/receiverprofiles/Makefile | 1 + receiver/receiverprofiles/go.mod | 62 ++++++++++++ receiver/receiverprofiles/go.sum | 111 +++++++++++++++++++++ receiver/receiverprofiles/profiles.go | 25 +++++ receiver/receiverprofiles/receiver_test.go | 47 +++++++++ versions.yaml | 1 + 10 files changed, 326 insertions(+), 1 deletion(-) create mode 100644 .chloggen/profiles-receiver.yaml create mode 100644 receiver/internal/profiles.go create mode 100644 receiver/receiverprofiles/Makefile create mode 100644 receiver/receiverprofiles/go.mod create mode 100644 receiver/receiverprofiles/go.sum create mode 100644 receiver/receiverprofiles/profiles.go create mode 100644 receiver/receiverprofiles/receiver_test.go diff --git a/.chloggen/profiles-receiver.yaml b/.chloggen/profiles-receiver.yaml new file mode 100644 index 00000000000..c167255eaf6 --- /dev/null +++ b/.chloggen/profiles-receiver.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# 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: receiver/receiverprofiles + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow handling profiles in receiver. + +# One or more tracking issues or pull requests related to the change +issues: [10690] + +# (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] diff --git a/receiver/go.mod b/receiver/go.mod index 790ffcb5d91..c85c9f676f4 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -9,6 +9,7 @@ require ( go.opentelemetry.io/collector/component v0.106.1 go.opentelemetry.io/collector/config/configtelemetry v0.106.1 go.opentelemetry.io/collector/consumer v0.106.1 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 go.opentelemetry.io/collector/consumer/consumertest v0.106.1 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/otel v1.28.0 @@ -37,7 +38,6 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect golang.org/x/net v0.26.0 // indirect diff --git a/receiver/internal/factory.go b/receiver/internal/factory.go index 24d05785ff8..bd7f581e382 100644 --- a/receiver/internal/factory.go +++ b/receiver/internal/factory.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" ) // Factory is a factory interface for receivers. @@ -44,6 +45,14 @@ type Factory interface { // LogsReceiverStability gets the stability level of the LogsReceiver. LogsReceiverStability() component.StabilityLevel + // CreateProfilesReceiver creates a ProfilesReceiver 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. `nextConsumer` is never nil. + CreateProfilesReceiver(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Profiles, error) + + // ProfilesReceiverStability gets the stability level of the ProfilesReceiver. + ProfilesReceiverStability() component.StabilityLevel + unexportedFactoryFunc() } @@ -107,6 +116,21 @@ func (f CreateLogsFunc) CreateLogsReceiver( return f(ctx, set, cfg, nextConsumer) } +// CreateProfilesFunc is the equivalent of Factory.CreateProfiles. +type CreateProfilesFunc func(context.Context, Settings, component.Config, consumerprofiles.Profiles) (Profiles, error) + +// CreateProfilesReceiver implements Factory.CreateProfilesReceiver(). +func (f CreateProfilesFunc) CreateProfilesReceiver( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles) (Profiles, error) { + if f == nil { + return nil, component.ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + type factory struct { cfgType component.Type component.CreateDefaultConfigFunc @@ -116,6 +140,8 @@ type factory struct { metricsStabilityLevel component.StabilityLevel CreateLogsFunc logsStabilityLevel component.StabilityLevel + CreateProfilesFunc + profilesStabilityLevel component.StabilityLevel } func (f *factory) Type() component.Type { @@ -136,6 +162,10 @@ func (f *factory) LogsReceiverStability() component.StabilityLevel { return f.logsStabilityLevel } +func (f *factory) ProfilesReceiverStability() component.StabilityLevel { + return f.profilesStabilityLevel +} + // WithTraces overrides the default "error not supported" implementation for CreateTracesReceiver and the default "undefined" stability level. func WithTraces(createTracesReceiver CreateTracesFunc, sl component.StabilityLevel) FactoryOption { return factoryOptionFunc(func(o *factory) { @@ -160,6 +190,14 @@ func WithLogs(createLogsReceiver CreateLogsFunc, sl component.StabilityLevel) Fa }) } +// WithProfiles overrides the default "error not supported" implementation for CreateProfilesReceiver and the default "undefined" stability level. +func WithProfiles(createProfilesReceiver CreateProfilesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.profilesStabilityLevel = sl + o.CreateProfilesFunc = createProfilesReceiver + }) +} + // NewFactory returns a Factory. func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory { f := &factory{ diff --git a/receiver/internal/profiles.go b/receiver/internal/profiles.go new file mode 100644 index 00000000000..04c784247f5 --- /dev/null +++ b/receiver/internal/profiles.go @@ -0,0 +1,15 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/receiver/internal" + +import "go.opentelemetry.io/collector/component" + +// Profiless receiver receives profiles. +// Its purpose is to translate data from any format to the collector's internal profile format. +// ProfilesReceiver feeds a consumer.Profiles with data. +// +// For example, it could be a pprof data source which translates pprof profiles into pprofile.Profiles. +type Profiles interface { + component.Component +} diff --git a/receiver/receiverprofiles/Makefile b/receiver/receiverprofiles/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/receiver/receiverprofiles/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/receiverprofiles/go.mod b/receiver/receiverprofiles/go.mod new file mode 100644 index 00000000000..7bec7bd5513 --- /dev/null +++ b/receiver/receiverprofiles/go.mod @@ -0,0 +1,62 @@ +module go.opentelemetry.io/collector/receiver/receiverprofiles + +go 1.21.0 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.106.1 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 + go.opentelemetry.io/collector/consumer/consumertest v0.106.1 + go.opentelemetry.io/collector/receiver v0.106.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + 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 + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect + go.opentelemetry.io/collector/consumer v0.106.1 // indirect + go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/receiver => ../ + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/receiver/receiverprofiles/go.sum b/receiver/receiverprofiles/go.sum new file mode 100644 index 00000000000..837886f3a46 --- /dev/null +++ b/receiver/receiverprofiles/go.sum @@ -0,0 +1,111 @@ +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.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= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/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/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= +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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +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.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +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.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +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.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +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-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/receiverprofiles/profiles.go b/receiver/receiverprofiles/profiles.go new file mode 100644 index 00000000000..a98668a04dc --- /dev/null +++ b/receiver/receiverprofiles/profiles.go @@ -0,0 +1,25 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package receiverprofiles // import "go.opentelemetry.io/collector/receiver/receiverprofiles" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/internal" +) + +// Profiles receiver receives profiles. +// Its purpose is to translate data from any format to the collector's internal profile format. +// ProfilessReceiver feeds a consumerprofiles.Profiles with data. +// +// For example, it could be a pprof data source which translates pprof profiles into pprofile.Profiles. +type Profiles = internal.Profiles + +// CreateProfilesFunc is the equivalent of Factory.CreateProfiles. +type CreateProfilesFunc = internal.CreateProfilesFunc + +// WithProfiles overrides the default "error not supported" implementation for CreateProfilesReceiver and the default "undefined" stability level. +func WithProfiles(createProfilesReceiver CreateProfilesFunc, sl component.StabilityLevel) receiver.FactoryOption { + return internal.WithProfiles(createProfilesReceiver, sl) +} diff --git a/receiver/receiverprofiles/receiver_test.go b/receiver/receiverprofiles/receiver_test.go new file mode 100644 index 00000000000..2ba69c6ac8b --- /dev/null +++ b/receiver/receiverprofiles/receiver_test.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package receiverprofiles + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer/consumerprofiles" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" +) + +func TestNewFactoryWithProfiles(t *testing.T) { + var testType = component.MustNewType("test") + defaultCfg := struct{}{} + factory := receiver.NewFactory( + testType, + func() component.Config { return &defaultCfg }, + WithProfiles(createProfiles, component.StabilityLevelAlpha), + ) + assert.EqualValues(t, testType, factory.Type()) + assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) + + assert.Equal(t, component.StabilityLevelAlpha, factory.ProfilesReceiverStability()) + _, err := factory.CreateProfilesReceiver(context.Background(), receiver.Settings{}, &defaultCfg, nil) + assert.NoError(t, err) +} + +var nopInstance = &nopReceiver{ + Consumer: consumertest.NewNop(), +} + +// nopReceiver stores consumed traces and metrics for testing purposes. +type nopReceiver struct { + component.StartFunc + component.ShutdownFunc + consumertest.Consumer +} + +func createProfiles(context.Context, receiver.Settings, component.Config, consumerprofiles.Profiles) (Profiles, error) { + return nopInstance, nil +} diff --git a/versions.yaml b/versions.yaml index 8444f6e19dc..390e7294c41 100644 --- a/versions.yaml +++ b/versions.yaml @@ -62,6 +62,7 @@ module-sets: - go.opentelemetry.io/collector/receiver - go.opentelemetry.io/collector/receiver/nopreceiver - go.opentelemetry.io/collector/receiver/otlpreceiver + - go.opentelemetry.io/collector/receiver/receiverprofiles - go.opentelemetry.io/collector/semconv - go.opentelemetry.io/collector/service - go.opentelemetry.io/collector/filter From 6d32c09daf9f91ec0dc35c45732e168663dfda10 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:55:31 -0600 Subject: [PATCH 05/19] [component] Move component status reporting public API to new componentstatus module (#10730) #### Description Duplicates component status reporting features from `component` into a separate module, `componentstatus`. In a future PR, when `component.TelemetrySettings.ReportStatus` is removed, I'll update Core to depend on `componentstatus`. This work isolates component status public API from `component` and `extensions`, which will allow us to move forward with their 1.0 work while component status reporting matures. #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/pull/10725 --------- Co-authored-by: Matthew Wear --- .chloggen/componentstatus-new-module.yaml | 25 ++++ Makefile | 2 + component/componentstatus/Makefile | 1 + component/componentstatus/go.mod | 34 ++++++ component/componentstatus/go.sum | 78 ++++++++++++ component/componentstatus/instance.go | 16 +++ component/componentstatus/status.go | 139 ++++++++++++++++++++++ component/componentstatus/status_test.go | 90 ++++++++++++++ versions.yaml | 1 + 9 files changed, 386 insertions(+) create mode 100644 .chloggen/componentstatus-new-module.yaml create mode 100644 component/componentstatus/Makefile create mode 100644 component/componentstatus/go.mod create mode 100644 component/componentstatus/go.sum create mode 100644 component/componentstatus/instance.go create mode 100644 component/componentstatus/status.go create mode 100644 component/componentstatus/status_test.go diff --git a/.chloggen/componentstatus-new-module.yaml b/.chloggen/componentstatus-new-module.yaml new file mode 100644 index 00000000000..17a11840b58 --- /dev/null +++ b/.chloggen/componentstatus-new-module.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# 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: componentstatus + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adds new componentstatus module that will soon replace status content in component. + +# One or more tracking issues or pull requests related to the change +issues: [10730] + +# (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] diff --git a/Makefile b/Makefile index e66d2fd36fd..ba35b2e397e 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,7 @@ check-contrib: -replace go.opentelemetry.io/collector=$(CURDIR) \ -replace go.opentelemetry.io/collector/client=$(CURDIR)/client \ -replace go.opentelemetry.io/collector/component=$(CURDIR)/component \ + -replace go.opentelemetry.io/collector/component/componentstatus=$(CURDIR)/component/componentstatus \ -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 \ @@ -321,6 +322,7 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector \ -dropreplace go.opentelemetry.io/collector/client \ -dropreplace go.opentelemetry.io/collector/component \ + -dropreplace go.opentelemetry.io/collector/component/componentstatus \ -dropreplace go.opentelemetry.io/collector/config/configauth \ -dropreplace go.opentelemetry.io/collector/config/configcompression \ -dropreplace go.opentelemetry.io/collector/config/configgrpc \ diff --git a/component/componentstatus/Makefile b/component/componentstatus/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/component/componentstatus/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/component/componentstatus/go.mod b/component/componentstatus/go.mod new file mode 100644 index 00000000000..c02c171b802 --- /dev/null +++ b/component/componentstatus/go.mod @@ -0,0 +1,34 @@ +module go.opentelemetry.io/collector/component/componentstatus + +go 1.21.0 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.106.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect + go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/component => ../ + +replace go.opentelemetry.io/collector/pdata => ../../pdata diff --git a/component/componentstatus/go.sum b/component/componentstatus/go.sum new file mode 100644 index 00000000000..147b5cbbcda --- /dev/null +++ b/component/componentstatus/go.sum @@ -0,0 +1,78 @@ +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.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/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.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +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.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +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.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +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-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/componentstatus/instance.go b/component/componentstatus/instance.go new file mode 100644 index 00000000000..22ea4c8003e --- /dev/null +++ b/component/componentstatus/instance.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package componentstatus // import "go.opentelemetry.io/collector/component/componentstatus" + +import "go.opentelemetry.io/collector/component" + +// InstanceID uniquely identifies a component instance +// +// TODO: consider moving this struct to a new package/module like `extension/statuswatcher` +// https://github.com/open-telemetry/opentelemetry-collector/issues/10764 +type InstanceID struct { + ID component.ID + Kind component.Kind + PipelineIDs map[component.ID]struct{} +} diff --git a/component/componentstatus/status.go b/component/componentstatus/status.go new file mode 100644 index 00000000000..6f016cf0797 --- /dev/null +++ b/component/componentstatus/status.go @@ -0,0 +1,139 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package componentstatus is an experimental module that defines how components should +// report health statues, how collector hosts should facilitate component status reporting, +// and how extensions should watch for new component statuses. +// +// This package is currently under development and is exempt from the Collector SIG's +// breaking change policy. +package componentstatus // import "go.opentelemetry.io/collector/component/componentstatus" + +import ( + "time" +) + +// Watcher is an extra interface for Extension hosted by the OpenTelemetry +// Collector that is to be implemented by extensions interested in changes to component +// status. +// +// TODO: consider moving this interface to a new package/module like `extension/statuswatcher` +// https://github.com/open-telemetry/opentelemetry-collector/issues/10764 +type Watcher 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 *InstanceID, event *Event) +} + +type Status int32 + +// Enumeration of possible component statuses +const ( + // StatusNone indicates absence of component status. + StatusNone Status = iota + // StatusStarting indicates the component is starting. + StatusStarting + // StatusOK indicates the component is running without issues. + StatusOK + // StatusRecoverableError indicates that the component has experienced a transient error and may recover. + StatusRecoverableError + // StatusPermanentError indicates that the component has detected a condition at runtime that will need human intervention to fix. The collector will continue to run in a degraded mode. + StatusPermanentError + // StatusFatalError indicates that the collector has experienced a fatal runtime error and will shut down. + StatusFatalError + // StatusStopping indicates that the component is in the process of shutting down. + StatusStopping + // StatusStopped indicates that the component has completed shutdown. + 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" +} + +// Event contains a status and timestamp, and can contain an error +type Event struct { + status Status + err error + // TODO: consider if a timestamp is necessary in the default Event struct or is needed only for the healthcheckv2 extension + // https://github.com/open-telemetry/opentelemetry-collector/issues/10763 + timestamp time.Time +} + +// Status returns the Status (enum) associated with the Event +func (ev *Event) Status() Status { + return ev.status +} + +// Err returns the error associated with the Event. +func (ev *Event) Err() error { + return ev.err +} + +// Timestamp returns the timestamp associated with the Event +func (ev *Event) Timestamp() time.Time { + return ev.timestamp +} + +// NewEvent creates and returns a Event 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 NewEvent(status Status) *Event { + return &Event{ + status: status, + timestamp: time.Now(), + } +} + +// NewRecoverableErrorEvent wraps a transient error +// passed as argument as a Event with a status StatusRecoverableError +// and a timestamp set to time.Now(). +func NewRecoverableErrorEvent(err error) *Event { + ev := NewEvent(StatusRecoverableError) + ev.err = err + return ev +} + +// NewPermanentErrorEvent wraps an error requiring human intervention to fix +// passed as argument as a Event with a status StatusPermanentError +// and a timestamp set to time.Now(). +func NewPermanentErrorEvent(err error) *Event { + ev := NewEvent(StatusPermanentError) + ev.err = err + return ev +} + +// NewFatalErrorEvent wraps the fatal runtime error passed as argument as a Event +// with a status StatusFatalError and a timestamp set to time.Now(). +func NewFatalErrorEvent(err error) *Event { + ev := NewEvent(StatusFatalError) + ev.err = err + return ev +} + +// StatusIsError returns true for error statuses (e.g. StatusRecoverableError, +// StatusPermanentError, or StatusFatalError) +func StatusIsError(status Status) bool { + return status == StatusRecoverableError || + status == StatusPermanentError || + status == StatusFatalError +} diff --git a/component/componentstatus/status_test.go b/component/componentstatus/status_test.go new file mode 100644 index 00000000000..7d66f2c5c3d --- /dev/null +++ b/component/componentstatus/status_test.go @@ -0,0 +1,90 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package componentstatus + +import ( + "fmt" + "testing" + + "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 := NewEvent(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) *Event{ + 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 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)) + }) + } +} diff --git a/versions.yaml b/versions.yaml index 390e7294c41..28d454d7549 100644 --- a/versions.yaml +++ b/versions.yaml @@ -20,6 +20,7 @@ module-sets: - go.opentelemetry.io/collector/cmd/builder - go.opentelemetry.io/collector/cmd/mdatagen - go.opentelemetry.io/collector/component + - go.opentelemetry.io/collector/component/componentstatus - go.opentelemetry.io/collector/component/componentprofiles - go.opentelemetry.io/collector/confmap - go.opentelemetry.io/collector/confmap/converter/expandconverter From a06e64baa0926bc5b83494289e4bf2414764f152 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:25:26 -0700 Subject: [PATCH 06/19] [chore] clean up outdated comment (#10774) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- internal/obsreportconfig/obsmetrics/obsmetrics.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/obsreportconfig/obsmetrics/obsmetrics.go b/internal/obsreportconfig/obsmetrics/obsmetrics.go index 02ce450d3a9..02a49557c88 100644 --- a/internal/obsreportconfig/obsmetrics/obsmetrics.go +++ b/internal/obsreportconfig/obsmetrics/obsmetrics.go @@ -2,8 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // Package obsmetrics defines the obsreport metrics for each components -// all the metrics is in OpenCensus format which will be replaced with OTEL Metrics -// in the future package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" const ( From eebb96b7ec98b5448e5383261801f1fe8495f827 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:36:58 -0700 Subject: [PATCH 07/19] remove opencensus bridge support (#10406) This removes the configuration of the OpenCensus bridge from the Collector. This means that any metric still relying on it will no longer be emitting metrics. Closes #10414 Closes #8945 This is blocked until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29867 is completed. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .chloggen/codeboten_rm-opencensus.yaml | 25 +++++ cmd/otelcorecol/go.mod | 3 - cmd/otelcorecol/go.sum | 79 ---------------- internal/globalgates/globalgates.go | 3 +- otelcol/go.mod | 3 - otelcol/go.sum | 79 ---------------- otelcol/otelcoltest/go.mod | 3 - otelcol/otelcoltest/go.sum | 79 ---------------- service/generated_package_test.go | 2 +- service/go.mod | 5 +- service/go.sum | 79 ---------------- service/internal/proctelemetry/config.go | 9 -- service/metadata.yaml | 2 - service/service.go | 4 - service/telemetry_test.go | 112 ++--------------------- 15 files changed, 36 insertions(+), 451 deletions(-) create mode 100644 .chloggen/codeboten_rm-opencensus.yaml diff --git a/.chloggen/codeboten_rm-opencensus.yaml b/.chloggen/codeboten_rm-opencensus.yaml new file mode 100644 index 00000000000..3599f765550 --- /dev/null +++ b/.chloggen/codeboten_rm-opencensus.yaml @@ -0,0 +1,25 @@ +# 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 OpenCensus bridge completely, mark feature gate as stable. + +# One or more tracking issues or pull requests related to the change +issues: [10414] + +# (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/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index a66b1d94807..d645f233b49 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -48,7 +48,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - 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.20.0 // indirect @@ -79,7 +78,6 @@ require ( 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.106.1 // indirect go.opentelemetry.io/collector/client v0.106.1 // indirect go.opentelemetry.io/collector/config/configauth v0.106.1 // indirect @@ -108,7 +106,6 @@ require ( go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/contrib/zpages v0.53.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect diff --git a/cmd/otelcorecol/go.sum b/cmd/otelcorecol/go.sum index c997fbaed2f..3bf33d4a69c 100644 --- a/cmd/otelcorecol/go.sum +++ b/cmd/otelcorecol/go.sum @@ -1,22 +1,13 @@ -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/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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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.4/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/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/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= @@ -32,33 +23,12 @@ github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAp github.com/go-viper/mapstructure/v2 v2.0.0/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/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/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/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.6/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.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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= @@ -104,7 +74,6 @@ 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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -127,12 +96,7 @@ github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3k 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.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.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= @@ -143,8 +107,6 @@ 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.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.8.0 h1:OD7aDMhL+2EpzdSHfkDmcdD/uUA+PgKM5faFyF9XFT0= go.opentelemetry.io/contrib/config v0.8.0/go.mod h1:dGeVZWE//3wrxYHHP0iCBYJU1QmOmPcbV+FNB7pjDYI= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= @@ -157,8 +119,6 @@ go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV go.opentelemetry.io/contrib/zpages v0.53.0/go.mod h1:iOo8fpUxMAu5+4x9DSEQeUOCeY19KaN6v2OPSeIggz4= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= @@ -200,32 +160,19 @@ 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/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= 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.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -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/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= @@ -240,10 +187,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -253,38 +196,16 @@ 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.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/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -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.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= -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/internal/globalgates/globalgates.go b/internal/globalgates/globalgates.go index 66f4b44bc9a..6cf27950b15 100644 --- a/internal/globalgates/globalgates.go +++ b/internal/globalgates/globalgates.go @@ -19,6 +19,7 @@ var StrictlyTypedInputGate = featuregate.GlobalRegistry().MustRegister(StrictlyT ) var DisableOpenCensusBridge = featuregate.GlobalRegistry().MustRegister("service.disableOpenCensusBridge", - featuregate.StageBeta, + featuregate.StageStable, featuregate.WithRegisterFromVersion("v0.105.0"), + featuregate.WithRegisterToVersion("v0.109.0"), featuregate.WithRegisterDescription("`Disables the OpenCensus bridge meaning any component still using the OpenCensus SDK will no longer be able to produce telemetry.")) diff --git a/otelcol/go.mod b/otelcol/go.mod index e2df95feaca..ebc457f87e5 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -35,7 +35,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0 // indirect 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.20.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -62,7 +61,6 @@ require ( 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.106.1 // indirect go.opentelemetry.io/collector/consumer v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect @@ -74,7 +72,6 @@ require ( go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect diff --git a/otelcol/go.sum b/otelcol/go.sum index f355af7fd98..2ba2558e085 100644 --- a/otelcol/go.sum +++ b/otelcol/go.sum @@ -1,22 +1,13 @@ -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/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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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.4/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/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/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= @@ -32,33 +23,12 @@ github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAp github.com/go-viper/mapstructure/v2 v2.0.0/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/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/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/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.6/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.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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= @@ -102,7 +72,6 @@ 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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -125,12 +94,7 @@ github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3k 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.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.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= @@ -141,8 +105,6 @@ 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.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.8.0 h1:OD7aDMhL+2EpzdSHfkDmcdD/uUA+PgKM5faFyF9XFT0= go.opentelemetry.io/contrib/config v0.8.0/go.mod h1:dGeVZWE//3wrxYHHP0iCBYJU1QmOmPcbV+FNB7pjDYI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= @@ -153,8 +115,6 @@ go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV go.opentelemetry.io/contrib/zpages v0.53.0/go.mod h1:iOo8fpUxMAu5+4x9DSEQeUOCeY19KaN6v2OPSeIggz4= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= @@ -196,32 +156,19 @@ 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/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= 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.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -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/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= @@ -236,10 +183,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -249,38 +192,16 @@ 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.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/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -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.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= -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/otelcol/otelcoltest/go.mod b/otelcol/otelcoltest/go.mod index bd15729ca12..bc229f26f83 100644 --- a/otelcol/otelcoltest/go.mod +++ b/otelcol/otelcoltest/go.mod @@ -31,7 +31,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0 // indirect 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.20.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -59,7 +58,6 @@ require ( 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.106.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect go.opentelemetry.io/collector/consumer v0.106.1 // indirect @@ -74,7 +72,6 @@ require ( go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect diff --git a/otelcol/otelcoltest/go.sum b/otelcol/otelcoltest/go.sum index f355af7fd98..2ba2558e085 100644 --- a/otelcol/otelcoltest/go.sum +++ b/otelcol/otelcoltest/go.sum @@ -1,22 +1,13 @@ -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/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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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.4/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/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/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= @@ -32,33 +23,12 @@ github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAp github.com/go-viper/mapstructure/v2 v2.0.0/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/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/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/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.6/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.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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= @@ -102,7 +72,6 @@ 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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -125,12 +94,7 @@ github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3k 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.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.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= @@ -141,8 +105,6 @@ 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.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.8.0 h1:OD7aDMhL+2EpzdSHfkDmcdD/uUA+PgKM5faFyF9XFT0= go.opentelemetry.io/contrib/config v0.8.0/go.mod h1:dGeVZWE//3wrxYHHP0iCBYJU1QmOmPcbV+FNB7pjDYI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= @@ -153,8 +115,6 @@ go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV go.opentelemetry.io/contrib/zpages v0.53.0/go.mod h1:iOo8fpUxMAu5+4x9DSEQeUOCeY19KaN6v2OPSeIggz4= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= @@ -196,32 +156,19 @@ 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/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= 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.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -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/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= @@ -236,10 +183,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -249,38 +192,16 @@ 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.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/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -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.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= -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/service/generated_package_test.go b/service/generated_package_test.go index 545b6bb0c5e..bc7ce3cd666 100644 --- a/service/generated_package_test.go +++ b/service/generated_package_test.go @@ -9,5 +9,5 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), goleak.IgnoreTopFunction("go.opentelemetry.io/collector/service/internal/proctelemetry.InitPrometheusServer.func1")) + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opentelemetry.io/collector/service/internal/proctelemetry.InitPrometheusServer.func1")) } diff --git a/service/go.mod b/service/go.mod index 108ac0ebfea..8544fc26302 100644 --- a/service/go.mod +++ b/service/go.mod @@ -9,7 +9,6 @@ require ( github.com/prometheus/common v0.55.0 github.com/shirou/gopsutil/v4 v4.24.6 github.com/stretchr/testify v1.9.0 - go.opencensus.io v0.24.0 go.opentelemetry.io/collector v0.106.1 go.opentelemetry.io/collector/component v0.106.1 go.opentelemetry.io/collector/config/confighttp v0.106.1 @@ -22,7 +21,6 @@ require ( go.opentelemetry.io/collector/extension v0.106.1 go.opentelemetry.io/collector/extension/zpagesextension v0.106.1 go.opentelemetry.io/collector/featuregate v1.12.0 - go.opentelemetry.io/collector/internal/globalgates v0.106.1 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.106.1 go.opentelemetry.io/collector/processor v0.106.1 @@ -31,7 +29,6 @@ require ( go.opentelemetry.io/contrib/config v0.8.0 go.opentelemetry.io/contrib/propagators/b3 v1.28.0 go.opentelemetry.io/otel v1.28.0 - go.opentelemetry.io/otel/bridge/opencensus v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 go.opentelemetry.io/otel/exporters/prometheus v0.50.0 @@ -58,7 +55,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect @@ -89,6 +85,7 @@ require ( go.opentelemetry.io/collector/config/internal v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/extension/auth v0.106.1 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/contrib/zpages v0.53.0 // indirect diff --git a/service/go.sum b/service/go.sum index 10942d2210f..0716d4c82ee 100644 --- a/service/go.sum +++ b/service/go.sum @@ -1,21 +1,12 @@ -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/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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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= 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/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= @@ -31,33 +22,12 @@ github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAp github.com/go-viper/mapstructure/v2 v2.0.0/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/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/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/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.6/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.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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= @@ -99,7 +69,6 @@ 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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -117,12 +86,7 @@ github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg 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/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.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= @@ -133,8 +97,6 @@ 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.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.8.0 h1:OD7aDMhL+2EpzdSHfkDmcdD/uUA+PgKM5faFyF9XFT0= go.opentelemetry.io/contrib/config v0.8.0/go.mod h1:dGeVZWE//3wrxYHHP0iCBYJU1QmOmPcbV+FNB7pjDYI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= @@ -145,8 +107,6 @@ go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV go.opentelemetry.io/contrib/zpages v0.53.0/go.mod h1:iOo8fpUxMAu5+4x9DSEQeUOCeY19KaN6v2OPSeIggz4= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= -go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= @@ -188,32 +148,19 @@ 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/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= 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.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -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/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= @@ -228,10 +175,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -241,38 +184,16 @@ 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.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/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -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.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= -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/service/internal/proctelemetry/config.go b/service/internal/proctelemetry/config.go index 3698329b000..b2d7ae19cb7 100644 --- a/service/internal/proctelemetry/config.go +++ b/service/internal/proctelemetry/config.go @@ -19,7 +19,6 @@ import ( "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" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" otelprom "go.opentelemetry.io/otel/exporters/prometheus" @@ -28,7 +27,6 @@ import ( sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" - "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/processor/processorhelper" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" ) @@ -69,10 +67,6 @@ func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErro } if reader.Periodic != nil { var opts []sdkmetric.PeriodicReaderOption - - if !globalgates.DisableOpenCensusBridge.IsEnabled() { - opts = append(opts, sdkmetric.WithProducer(opencensus.NewMetricProducer())) - } if reader.Periodic.Interval != nil { opts = append(opts, sdkmetric.WithInterval(time.Duration(*reader.Periodic.Interval)*time.Millisecond)) } @@ -174,9 +168,6 @@ func initPrometheusExporter(prometheusConfig *config.Prometheus, asyncErrorChann otelprom.WithoutCounterSuffixes(), otelprom.WithResourceAsConstantLabels(attribute.NewDenyKeysFilter()), } - if !globalgates.DisableOpenCensusBridge.IsEnabled() { - opts = append(opts, otelprom.WithProducer(opencensus.NewMetricProducer())) - } exporter, err := otelprom.New(opts...) if err != nil { return nil, nil, fmt.Errorf("error creating otel prometheus exporter: %w", err) diff --git a/service/metadata.yaml b/service/metadata.yaml index d5417740d57..886f71549e0 100644 --- a/service/metadata.yaml +++ b/service/metadata.yaml @@ -10,8 +10,6 @@ tests: goleak: ignore: top: - # See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. - - "go.opencensus.io/stats/view.(*worker).start" - "go.opentelemetry.io/collector/service/internal/proctelemetry.InitPrometheusServer.func1" telemetry: diff --git a/service/service.go b/service/service.go index 320a7068bcf..88efd1adb91 100644 --- a/service/service.go +++ b/service/service.go @@ -22,7 +22,6 @@ import ( "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/internal/localhostgate" "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/pdata/pcommon" @@ -116,9 +115,6 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { logger.Info("Setting up own telemetry...") - if globalgates.DisableOpenCensusBridge.IsEnabled() { - logger.Info("OpenCensus bridge is disabled for Collector telemetry and will be removed in a future version, use --feature-gates=-service.disableOpenCensusBridge to re-enable") - } mp, err := newMeterProvider( meterProviderSettings{ res: res, diff --git a/service/telemetry_test.go b/service/telemetry_test.go index 2d264040156..a8a382c62ec 100644 --- a/service/telemetry_test.go +++ b/service/telemetry_test.go @@ -12,15 +12,11 @@ import ( io_prometheus_client "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" "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.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/internal/testutil" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.opentelemetry.io/collector/service/internal/proctelemetry" @@ -31,7 +27,6 @@ import ( const ( metricPrefix = "otelcol_" otelPrefix = "otel_sdk_" - ocPrefix = "oc_sdk_" grpcPrefix = "gprc_" httpPrefix = "http_" counterName = "test_counter" @@ -44,24 +39,15 @@ func TestTelemetryInit(t *testing.T) { } for _, tc := range []struct { - name string - disableHighCard bool - disableCensusBridge bool - expectedMetrics map[string]metricValue - extendedConfig bool - cfg *telemetry.Config + name string + disableHighCard bool + expectedMetrics map[string]metricValue + extendedConfig bool + cfg *telemetry.Config }{ { name: "UseOpenTelemetryForInternalMetrics", expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName: { - value: 13, - labels: map[string]string{ - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, metricPrefix + otelPrefix + counterName: { value: 13, labels: map[string]string{ @@ -105,14 +91,6 @@ func TestTelemetryInit(t *testing.T) { name: "DisableHighCardinalityWithOtel", disableHighCard: true, expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName: { - value: 13, - labels: map[string]string{ - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, metricPrefix + otelPrefix + counterName: { value: 13, labels: map[string]string{ @@ -169,56 +147,6 @@ func TestTelemetryInit(t *testing.T) { semconv.AttributeServiceInstanceID: &testInstanceID, }, }, - expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName: { - value: 13, - labels: map[string]string{ - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, - metricPrefix + otelPrefix + counterName: { - value: 13, - labels: map[string]string{ - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, - metricPrefix + grpcPrefix + counterName: { - value: 11, - labels: map[string]string{ - "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: { - value: 10, - labels: map[string]string{ - "net_host_name": "", - "net_host_port": "", - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, - "target_info": { - value: 0, - labels: map[string]string{ - "service_name": "otelcol", - "service_version": "latest", - "service_instance_id": testInstanceID, - }, - }, - }, - }, - { - name: "DisableOpenCensusBridge", expectedMetrics: map[string]metricValue{ metricPrefix + otelPrefix + counterName: { value: 13, @@ -258,14 +186,9 @@ func TestTelemetryInit(t *testing.T) { }, }, }, - disableCensusBridge: true, }, } { t.Run(tc.name, func(t *testing.T) { - require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.DisableOpenCensusBridge.ID(), tc.disableCensusBridge)) - t.Cleanup(func() { - require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.DisableOpenCensusBridge.ID(), true)) - }) if tc.extendedConfig { tc.cfg.Metrics.Readers = []config.MetricReader{ { @@ -301,10 +224,7 @@ func TestTelemetryInit(t *testing.T) { } }() - v := createTestMetrics(t, mp) - defer func() { - view.Unregister(v) - }() + createTestMetrics(t, mp) metrics := getMetricsFromPrometheus(t, mp.(*meterProvider).servers[0].Handler) require.Equal(t, len(tc.expectedMetrics), len(metrics)) @@ -327,7 +247,7 @@ func TestTelemetryInit(t *testing.T) { } } -func createTestMetrics(t *testing.T, mp metric.MeterProvider) *view.View { +func createTestMetrics(t *testing.T, mp metric.MeterProvider) { // Creates a OTel Go counter counter, err := mp.Meter("collector_test").Int64Counter(metricPrefix+otelPrefix+counterName, metric.WithUnit("ms")) require.NoError(t, err) @@ -340,24 +260,6 @@ func createTestMetrics(t *testing.T, mp metric.MeterProvider) *view.View { httpExampleCounter, err := mp.Meter(proctelemetry.HTTPInstrumentation).Int64Counter(metricPrefix + httpPrefix + counterName) require.NoError(t, err) httpExampleCounter.Add(context.Background(), 10, metric.WithAttributes(proctelemetry.HTTPUnacceptableKeyValues...)) - - // Creates a OpenCensus measure - ocCounter := stats.Int64(metricPrefix+ocPrefix+counterName, counterName, stats.UnitDimensionless) - v := &view.View{ - Name: metricPrefix + ocPrefix + counterName, - Description: ocCounter.Description(), - Measure: ocCounter, - Aggregation: view.Sum(), - } - err = view.Register(v) - require.NoError(t, err) - - stats.Record(context.Background(), stats.Int64(metricPrefix+ocPrefix+counterName, counterName, stats.UnitDimensionless).M(13)) - - // Forces a flush for the view data. - _, _ = view.RetrieveData(metricPrefix + ocPrefix + counterName) - - return v } func getMetricsFromPrometheus(t *testing.T, handler http.Handler) map[string]*io_prometheus_client.MetricFamily { From c0188e02a2987be9ae98eeef2d91f1a20873c046 Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Thu, 1 Aug 2024 00:43:08 +0200 Subject: [PATCH 08/19] Add profiles support in connector (#10703) #### Description This follows https://github.com/open-telemetry/opentelemetry-collector/pull/10524 and adds profiles support into connectors. #### Link to tracking issue See https://github.com/open-telemetry/opentelemetry-collector/pull/10375 --- .chloggen/profiles-connector.yaml | 25 ++ Makefile | 2 + cmd/builder/internal/builder/main_test.go | 1 + cmd/builder/test/core.builder.yaml | 1 + cmd/otelcorecol/builder-config.yaml | 1 + cmd/otelcorecol/go.mod | 3 + connector/connectorprofiles/Makefile | 1 + connector/connectorprofiles/connector.go | 80 ++++++ connector/connectorprofiles/connector_test.go | 144 ++++++++++ connector/connectorprofiles/go.mod | 66 +++++ connector/connectorprofiles/go.sum | 111 ++++++++ connector/forwardconnector/go.mod | 3 + connector/go.mod | 5 +- connector/internal/factory.go | 248 +++++++++++++++++- connector/internal/profiles.go | 26 ++ otelcol/go.mod | 3 + otelcol/otelcoltest/go.mod | 3 + service/go.mod | 3 + versions.yaml | 1 + 19 files changed, 717 insertions(+), 10 deletions(-) create mode 100644 .chloggen/profiles-connector.yaml create mode 100644 connector/connectorprofiles/Makefile create mode 100644 connector/connectorprofiles/connector.go create mode 100644 connector/connectorprofiles/connector_test.go create mode 100644 connector/connectorprofiles/go.mod create mode 100644 connector/connectorprofiles/go.sum create mode 100644 connector/internal/profiles.go diff --git a/.chloggen/profiles-connector.yaml b/.chloggen/profiles-connector.yaml new file mode 100644 index 00000000000..3cddea2ffad --- /dev/null +++ b/.chloggen/profiles-connector.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# 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: connector/connectorprofiles + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow handling profiles in connector. + +# One or more tracking issues or pull requests related to the change +issues: [10703] + +# (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] diff --git a/Makefile b/Makefile index ba35b2e397e..052cbcd5d81 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,7 @@ check-contrib: -replace go.opentelemetry.io/collector=$(CURDIR) \ -replace go.opentelemetry.io/collector/client=$(CURDIR)/client \ -replace go.opentelemetry.io/collector/component=$(CURDIR)/component \ + -replace go.opentelemetry.io/collector/component/componentprofiles=$(CURDIR)/component/componentprofiles \ -replace go.opentelemetry.io/collector/component/componentstatus=$(CURDIR)/component/componentstatus \ -replace go.opentelemetry.io/collector/config/configauth=$(CURDIR)/config/configauth \ -replace go.opentelemetry.io/collector/config/configcompression=$(CURDIR)/config/configcompression \ @@ -322,6 +323,7 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector \ -dropreplace go.opentelemetry.io/collector/client \ -dropreplace go.opentelemetry.io/collector/component \ + -dropreplace go.opentelemetry.io/collector/component/componentprofiles \ -dropreplace go.opentelemetry.io/collector/component/componentstatus \ -dropreplace go.opentelemetry.io/collector/config/configauth \ -dropreplace go.opentelemetry.io/collector/config/configcompression \ diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index 3c6a614e609..3dc92e9f2dc 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -41,6 +41,7 @@ var ( replaceModules = []string{ "", "/component", + "/component/componentprofiles", "/client", "/config/configauth", "/config/configcompression", diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 33c8d3ed39a..ab0f73bf1ff 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -21,6 +21,7 @@ replaces: - go.opentelemetry.io/collector => ${WORKSPACE_DIR} - go.opentelemetry.io/collector/client => ${WORKSPACE_DIR}/client - go.opentelemetry.io/collector/component => ${WORKSPACE_DIR}/component + - go.opentelemetry.io/collector/component/componentprofiles => ${WORKSPACE_DIR}/component/componentprofiles - go.opentelemetry.io/collector/config/configauth => ${WORKSPACE_DIR}/config/configauth - go.opentelemetry.io/collector/config/configcompression => ${WORKSPACE_DIR}/config/configcompression - go.opentelemetry.io/collector/config/configgrpc => ${WORKSPACE_DIR}/config/configgrpc diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index ec2501f5706..3dfa4b40729 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -45,6 +45,7 @@ replaces: - go.opentelemetry.io/collector/client => ../../client - go.opentelemetry.io/collector/otelcol => ../../otelcol - go.opentelemetry.io/collector/component => ../../component + - go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles - go.opentelemetry.io/collector/config/configauth => ../../config/configauth - go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression - go.opentelemetry.io/collector/config/configgrpc => ../../config/configgrpc diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index d645f233b49..c16d7426a0f 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -80,6 +80,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector v0.106.1 // indirect go.opentelemetry.io/collector/client v0.106.1 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/config/configauth v0.106.1 // indirect go.opentelemetry.io/collector/config/configcompression v1.12.0 // indirect go.opentelemetry.io/collector/config/configgrpc v0.106.1 // indirect @@ -145,6 +146,8 @@ replace go.opentelemetry.io/collector/otelcol => ../../otelcol replace go.opentelemetry.io/collector/component => ../../component +replace go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles + replace go.opentelemetry.io/collector/config/configauth => ../../config/configauth replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression diff --git a/connector/connectorprofiles/Makefile b/connector/connectorprofiles/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/connector/connectorprofiles/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/connector/connectorprofiles/connector.go b/connector/connectorprofiles/connector.go new file mode 100644 index 00000000000..c9888e877d8 --- /dev/null +++ b/connector/connectorprofiles/connector.go @@ -0,0 +1,80 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector/connectorprofiles" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/internal" +) + +// A Profiles connector acts as an exporter from a profiles pipeline and a receiver +// to one or more traces, metrics, logs, or profiles pipelines. +// Profiles feeds a consumer.Traces, consumer.Metrics, consumer.Logs, or consumerprofiles.Profiles with data. +// +// Examples: +// - Profiles could be collected in one pipeline and routed to another profiles pipeline +// based on criteria such as attributes or other content of the profile. The second +// pipeline can then process and export the profile to the appropriate backend. +// - Profiles could be summarized by a metrics connector that emits statistics describing +// the number of profiles observed. +// - Profiles could be analyzed by a logs connector that emits events when particular +// criteria are met. +type Profiles = internal.Profiles + +// CreateTracesToProfilesFunc is the equivalent of Factory.CreateTracesToProfiles(). +type CreateTracesToProfilesFunc = internal.CreateTracesToProfilesFunc + +// CreateMetricsToProfilesFunc is the equivalent of Factory.CreateMetricsToProfiles(). +type CreateMetricsToProfilesFunc = internal.CreateMetricsToProfilesFunc + +// CreateLogsToProfilesFunc is the equivalent of Factory.CreateLogsToProfiles(). +type CreateLogsToProfilesFunc = internal.CreateLogsToProfilesFunc + +// CreateProfilesToProfilesFunc is the equivalent of Factory.CreateProfilesToProfiles(). +type CreateProfilesToProfilesFunc = internal.CreateProfilesToProfilesFunc + +// CreateProfilesToTracesFunc is the equivalent of Factory.CreateProfilesToTraces(). +type CreateProfilesToTracesFunc = internal.CreateProfilesToTracesFunc + +// CreateProfilesToMetricsFunc is the equivalent of Factory.CreateProfilesToMetrics(). +type CreateProfilesToMetricsFunc = internal.CreateProfilesToMetricsFunc + +// CreateProfilesToLogsFunc is the equivalent of Factory.CreateProfilesToLogs(). +type CreateProfilesToLogsFunc = internal.CreateProfilesToLogsFunc + +// WithTracesToProfiles overrides the default "error not supported" implementation for WithTracesToProfiles and the default "undefined" stability level. +func WithTracesToProfiles(createTracesToProfiles CreateTracesToProfilesFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithTracesToProfiles(createTracesToProfiles, sl) +} + +// WithMetricsToProfiles overrides the default "error not supported" implementation for WithMetricsToProfiles and the default "undefined" stability level. +func WithMetricsToProfiles(createMetricsToProfiles CreateMetricsToProfilesFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithMetricsToProfiles(createMetricsToProfiles, sl) +} + +// WithLogsToProfiles overrides the default "error not supported" implementation for WithLogsToProfiles and the default "undefined" stability level. +func WithLogsToProfiles(createLogsToProfiles CreateLogsToProfilesFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithLogsToProfiles(createLogsToProfiles, sl) +} + +// WithProfilesToProfiles overrides the default "error not supported" implementation for WithProfilesToProfiles and the default "undefined" stability level. +func WithProfilesToProfiles(createProfilesToProfiles CreateProfilesToProfilesFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithProfilesToProfiles(createProfilesToProfiles, sl) +} + +// WithProfilesToTraces overrides the default "error not supported" implementation for WithProfilesToTraces and the default "undefined" stability level. +func WithProfilesToTraces(createProfilesToTraces CreateProfilesToTracesFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithProfilesToTraces(createProfilesToTraces, sl) +} + +// WithProfilesToMetrics overrides the default "error not supported" implementation for WithProfilesToMetrics and the default "undefined" stability level. +func WithProfilesToMetrics(createProfilesToMetrics CreateProfilesToMetricsFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithProfilesToMetrics(createProfilesToMetrics, sl) +} + +// WithProfilesToLogs overrides the default "error not supported" implementation for WithProfilesToLogs and the default "undefined" stability level. +func WithProfilesToLogs(createProfilesToLogs CreateProfilesToLogsFunc, sl component.StabilityLevel) connector.FactoryOption { + return internal.WithProfilesToLogs(createProfilesToLogs, sl) +} diff --git a/connector/connectorprofiles/connector_test.go b/connector/connectorprofiles/connector_test.go new file mode 100644 index 00000000000..e40f83c0b6d --- /dev/null +++ b/connector/connectorprofiles/connector_test.go @@ -0,0 +1,144 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector" + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componentprofiles" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/internal" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +var ( + testType = component.MustNewType("test") + testID = component.MustNewIDWithName("type", "name") +) + +func TestNewFactoryNoOptions(t *testing.T) { + defaultCfg := struct{}{} + factory := connector.NewFactory(testType, func() component.Config { return &defaultCfg }) + assert.EqualValues(t, testType, factory.Type()) + assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) + + _, err := factory.CreateTracesToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, component.DataTypeTraces, componentprofiles.DataTypeProfiles)) + _, err = factory.CreateMetricsToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, component.DataTypeMetrics, componentprofiles.DataTypeProfiles)) + _, err = factory.CreateLogsToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, component.DataTypeLogs, componentprofiles.DataTypeProfiles)) + + _, err = factory.CreateProfilesToTraces(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeTraces)) + _, err = factory.CreateProfilesToMetrics(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeMetrics)) + _, err = factory.CreateProfilesToLogs(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeLogs)) +} + +func TestNewFactoryWithSameTypes(t *testing.T) { + defaultCfg := struct{}{} + factory := connector.NewFactory(testType, func() component.Config { return &defaultCfg }, + WithProfilesToProfiles(createProfilesToProfiles, component.StabilityLevelAlpha), + ) + assert.EqualValues(t, testType, factory.Type()) + assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) + + assert.Equal(t, component.StabilityLevelAlpha, factory.ProfilesToProfilesStability()) + _, err := factory.CreateProfilesToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + _, err = factory.CreateProfilesToTraces(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeTraces)) + _, err = factory.CreateProfilesToMetrics(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeMetrics)) + _, err = factory.CreateProfilesToLogs(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, component.DataTypeLogs)) +} + +func TestNewFactoryWithTranslateTypes(t *testing.T) { + defaultCfg := struct{}{} + factory := connector.NewFactory(testType, func() component.Config { return &defaultCfg }, + WithTracesToProfiles(createTracesToProfiles, component.StabilityLevelBeta), + WithMetricsToProfiles(createMetricsToProfiles, component.StabilityLevelDevelopment), + WithLogsToProfiles(createLogsToProfiles, component.StabilityLevelAlpha), + + WithProfilesToTraces(createProfilesToTraces, component.StabilityLevelBeta), + WithProfilesToMetrics(createProfilesToMetrics, component.StabilityLevelDevelopment), + WithProfilesToLogs(createProfilesToLogs, component.StabilityLevelAlpha), + ) + assert.EqualValues(t, testType, factory.Type()) + assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) + + _, err := factory.CreateProfilesToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.Equal(t, err, internal.ErrDataTypes(testID, componentprofiles.DataTypeProfiles, componentprofiles.DataTypeProfiles)) + + assert.Equal(t, component.StabilityLevelBeta, factory.TracesToProfilesStability()) + _, err = factory.CreateTracesToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + assert.Equal(t, component.StabilityLevelDevelopment, factory.MetricsToProfilesStability()) + _, err = factory.CreateMetricsToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + assert.Equal(t, component.StabilityLevelAlpha, factory.LogsToProfilesStability()) + _, err = factory.CreateLogsToProfiles(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + assert.Equal(t, component.StabilityLevelBeta, factory.ProfilesToTracesStability()) + _, err = factory.CreateProfilesToTraces(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + assert.Equal(t, component.StabilityLevelDevelopment, factory.ProfilesToMetricsStability()) + _, err = factory.CreateProfilesToMetrics(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) + + assert.Equal(t, component.StabilityLevelAlpha, factory.ProfilesToLogsStability()) + _, err = factory.CreateProfilesToLogs(context.Background(), connector.Settings{ID: testID}, &defaultCfg, consumertest.NewNop()) + assert.NoError(t, err) +} + +var nopInstance = &nopConnector{ + Consumer: consumertest.NewNop(), +} + +// nopConnector stores consumed traces and metrics for testing purposes. +type nopConnector struct { + component.StartFunc + component.ShutdownFunc + consumertest.Consumer +} + +func createTracesToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Traces, error) { + return nopInstance, nil +} + +func createMetricsToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Metrics, error) { + return nopInstance, nil +} + +func createLogsToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Logs, error) { + return nopInstance, nil +} + +func createProfilesToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (Profiles, error) { + return nopInstance, nil +} + +func createProfilesToTraces(context.Context, connector.Settings, component.Config, consumer.Traces) (Profiles, error) { + return nopInstance, nil +} +func createProfilesToMetrics(context.Context, connector.Settings, component.Config, consumer.Metrics) (Profiles, error) { + return nopInstance, nil +} +func createProfilesToLogs(context.Context, connector.Settings, component.Config, consumer.Logs) (Profiles, error) { + return nopInstance, nil +} diff --git a/connector/connectorprofiles/go.mod b/connector/connectorprofiles/go.mod new file mode 100644 index 00000000000..c53c47d7a6f --- /dev/null +++ b/connector/connectorprofiles/go.mod @@ -0,0 +1,66 @@ +module go.opentelemetry.io/collector/connector/connectorprofiles + +go 1.21.0 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.106.1 + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-20240723122248-8b5e2318374d + go.opentelemetry.io/collector/connector v0.106.1 + go.opentelemetry.io/collector/consumer v0.106.1 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 + go.opentelemetry.io/collector/consumer/consumertest v0.106.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + 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 + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/collector v0.106.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect + go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/connector => ../ + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest + +replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/connector/connectorprofiles/go.sum b/connector/connectorprofiles/go.sum new file mode 100644 index 00000000000..837886f3a46 --- /dev/null +++ b/connector/connectorprofiles/go.sum @@ -0,0 +1,111 @@ +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.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= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/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/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= +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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +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.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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +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.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +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.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +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.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +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-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/go.mod b/connector/forwardconnector/go.mod index 91422951a2f..5864c53aee3 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -38,6 +38,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector v0.106.1 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect @@ -90,3 +91,5 @@ replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest + +replace go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles diff --git a/connector/go.mod b/connector/go.mod index e7e28230e29..d6866619d71 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -7,7 +7,9 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector v0.106.1 go.opentelemetry.io/collector/component v0.106.1 + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/consumer v0.106.1 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 go.opentelemetry.io/collector/consumer/consumertest v0.106.1 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.106.1 @@ -33,7 +35,6 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -73,3 +74,5 @@ replace go.opentelemetry.io/collector/internal/globalgates => ../internal/global replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest + +replace go.opentelemetry.io/collector/component/componentprofiles => ../component/componentprofiles diff --git a/connector/internal/factory.go b/connector/internal/factory.go index 4fb92a8a47b..5cff95c854a 100644 --- a/connector/internal/factory.go +++ b/connector/internal/factory.go @@ -8,7 +8,9 @@ import ( "fmt" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componentprofiles" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" ) // Factory is a factory interface for connectors. @@ -30,26 +32,42 @@ type Factory interface { CreateTracesToTraces(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Traces) (Traces, error) CreateTracesToMetrics(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Metrics) (Traces, error) CreateTracesToLogs(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Logs) (Traces, error) + CreateTracesToProfiles(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Traces, error) CreateMetricsToTraces(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Traces) (Metrics, error) CreateMetricsToMetrics(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Metrics) (Metrics, error) CreateMetricsToLogs(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Logs) (Metrics, error) + CreateMetricsToProfiles(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Metrics, error) CreateLogsToTraces(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Traces) (Logs, error) CreateLogsToMetrics(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Metrics) (Logs, error) CreateLogsToLogs(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Logs) (Logs, error) + CreateLogsToProfiles(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Logs, error) + + CreateProfilesToProfiles(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumerprofiles.Profiles) (Profiles, error) + CreateProfilesToTraces(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Traces) (Profiles, error) + CreateProfilesToMetrics(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Metrics) (Profiles, error) + CreateProfilesToLogs(ctx context.Context, set Settings, cfg component.Config, nextConsumer consumer.Logs) (Profiles, error) TracesToTracesStability() component.StabilityLevel TracesToMetricsStability() component.StabilityLevel TracesToLogsStability() component.StabilityLevel + TracesToProfilesStability() component.StabilityLevel MetricsToTracesStability() component.StabilityLevel MetricsToMetricsStability() component.StabilityLevel MetricsToLogsStability() component.StabilityLevel + MetricsToProfilesStability() component.StabilityLevel LogsToTracesStability() component.StabilityLevel LogsToMetricsStability() component.StabilityLevel LogsToLogsStability() component.StabilityLevel + LogsToProfilesStability() component.StabilityLevel + + ProfilesToProfilesStability() component.StabilityLevel + ProfilesToTracesStability() component.StabilityLevel + ProfilesToMetricsStability() component.StabilityLevel + ProfilesToLogsStability() component.StabilityLevel unexportedFactoryFunc() } @@ -77,26 +95,42 @@ type factory struct { CreateTracesToTracesFunc CreateTracesToMetricsFunc CreateTracesToLogsFunc + CreateTracesToProfilesFunc CreateMetricsToTracesFunc CreateMetricsToMetricsFunc CreateMetricsToLogsFunc + CreateMetricsToProfilesFunc CreateLogsToTracesFunc CreateLogsToMetricsFunc CreateLogsToLogsFunc + CreateLogsToProfilesFunc + + CreateProfilesToProfilesFunc + CreateProfilesToTracesFunc + CreateProfilesToMetricsFunc + CreateProfilesToLogsFunc + + tracesToTracesStabilityLevel component.StabilityLevel + tracesToMetricsStabilityLevel component.StabilityLevel + tracesToLogsStabilityLevel component.StabilityLevel + tracesToProfilesStabilityLevel component.StabilityLevel - tracesToTracesStabilityLevel component.StabilityLevel - tracesToMetricsStabilityLevel component.StabilityLevel - tracesToLogsStabilityLevel component.StabilityLevel + metricsToTracesStabilityLevel component.StabilityLevel + metricsToMetricsStabilityLevel component.StabilityLevel + metricsToLogsStabilityLevel component.StabilityLevel + metricsToProfilesStabilityLevel component.StabilityLevel - metricsToTracesStabilityLevel component.StabilityLevel - metricsToMetricsStabilityLevel component.StabilityLevel - metricsToLogsStabilityLevel component.StabilityLevel + logsToTracesStabilityLevel component.StabilityLevel + logsToMetricsStabilityLevel component.StabilityLevel + logsToLogsStabilityLevel component.StabilityLevel + logsToProfilesStabilityLevel component.StabilityLevel - logsToTracesStabilityLevel component.StabilityLevel - logsToMetricsStabilityLevel component.StabilityLevel - logsToLogsStabilityLevel component.StabilityLevel + profilesToProfilesStabilityLevel component.StabilityLevel + profilesToTracesStabilityLevel component.StabilityLevel + profilesToMetricsStabilityLevel component.StabilityLevel + profilesToLogsStabilityLevel component.StabilityLevel } // CreateTracesToTracesFunc is the equivalent of Factory.CreateTracesToTraces(). @@ -146,6 +180,22 @@ func (f CreateTracesToLogsFunc) CreateTracesToLogs( return f(ctx, set, cfg, nextConsumer) } +// CreateTracesToProfilesFunc is the equivalent of Factory.CreateTracesToProfiles(). +type CreateTracesToProfilesFunc func(context.Context, Settings, component.Config, consumerprofiles.Profiles) (Traces, error) + +// CreateTracesToProfiles implements Factory.CreateTracesToProfiles(). +func (f CreateTracesToProfilesFunc) CreateTracesToProfiles( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles, +) (Traces, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, component.DataTypeTraces, componentprofiles.DataTypeProfiles) + } + return f(ctx, set, cfg, nextConsumer) +} + // CreateMetricsToTracesFunc is the equivalent of Factory.CreateMetricsToTraces(). type CreateMetricsToTracesFunc func(context.Context, Settings, component.Config, consumer.Traces) (Metrics, error) @@ -194,6 +244,22 @@ func (f CreateMetricsToLogsFunc) CreateMetricsToLogs( return f(ctx, set, cfg, nextConsumer) } +// CreateMetricsToProfilesFunc is the equivalent of Factory.CreateMetricsToProfiles(). +type CreateMetricsToProfilesFunc func(context.Context, Settings, component.Config, consumerprofiles.Profiles) (Metrics, error) + +// CreateMetricsToProfiles implements Factory.CreateMetricsToProfiles(). +func (f CreateMetricsToProfilesFunc) CreateMetricsToProfiles( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles, +) (Metrics, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, component.DataTypeMetrics, componentprofiles.DataTypeProfiles) + } + return f(ctx, set, cfg, nextConsumer) +} + // CreateLogsToTracesFunc is the equivalent of Factory.CreateLogsToTraces(). type CreateLogsToTracesFunc func(context.Context, Settings, component.Config, consumer.Traces) (Logs, error) @@ -242,6 +308,86 @@ func (f CreateLogsToLogsFunc) CreateLogsToLogs( return f(ctx, set, cfg, nextConsumer) } +// CreateLogsToProfilesFunc is the equivalent of Factory.CreateLogsToProfiles(). +type CreateLogsToProfilesFunc func(context.Context, Settings, component.Config, consumerprofiles.Profiles) (Logs, error) + +// CreateLogsToProfiles implements Factory.CreateLogsToProfiles(). +func (f CreateLogsToProfilesFunc) CreateLogsToProfiles( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles, +) (Logs, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, component.DataTypeLogs, componentprofiles.DataTypeProfiles) + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateProfilesToProfilesFunc is the equivalent of Factory.CreateProfilesToProfiles(). +type CreateProfilesToProfilesFunc func(context.Context, Settings, component.Config, consumerprofiles.Profiles) (Profiles, error) + +// CreateProfilesToProfiles implements Factory.CreateProfilesToProfiles(). +func (f CreateProfilesToProfilesFunc) CreateProfilesToProfiles( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles, +) (Profiles, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, componentprofiles.DataTypeProfiles, componentprofiles.DataTypeProfiles) + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateProfilesToTracesFunc is the equivalent of Factory.CreateProfilesToTraces(). +type CreateProfilesToTracesFunc func(context.Context, Settings, component.Config, consumer.Traces) (Profiles, error) + +// CreateProfilesToTraces implements Factory.CreateProfilesToTraces(). +func (f CreateProfilesToTracesFunc) CreateProfilesToTraces( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumer.Traces, +) (Profiles, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, componentprofiles.DataTypeProfiles, component.DataTypeTraces) + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateProfilesToMetricsFunc is the equivalent of Factory.CreateProfilesToMetrics(). +type CreateProfilesToMetricsFunc func(context.Context, Settings, component.Config, consumer.Metrics) (Profiles, error) + +// CreateProfilesToMetrics implements Factory.CreateProfilesToMetrics(). +func (f CreateProfilesToMetricsFunc) CreateProfilesToMetrics( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumer.Metrics, +) (Profiles, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, componentprofiles.DataTypeProfiles, component.DataTypeMetrics) + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateProfilesToLogsFunc is the equivalent of Factory.CreateProfilesToLogs(). +type CreateProfilesToLogsFunc func(context.Context, Settings, component.Config, consumer.Logs) (Profiles, error) + +// CreateProfilesToLogs implements Factory.CreateProfilesToLogs(). +func (f CreateProfilesToLogsFunc) CreateProfilesToLogs( + ctx context.Context, + set Settings, + cfg component.Config, + nextConsumer consumer.Logs, +) (Profiles, error) { + if f == nil { + return nil, ErrDataTypes(set.ID, componentprofiles.DataTypeProfiles, component.DataTypeLogs) + } + return f(ctx, set, cfg, nextConsumer) +} + // Type returns the type of component. func (f *factory) Type() component.Type { return f.cfgType @@ -261,6 +407,10 @@ func (f factory) TracesToLogsStability() component.StabilityLevel { return f.tracesToLogsStabilityLevel } +func (f factory) TracesToProfilesStability() component.StabilityLevel { + return f.tracesToProfilesStabilityLevel +} + func (f factory) MetricsToTracesStability() component.StabilityLevel { return f.metricsToTracesStabilityLevel } @@ -273,6 +423,10 @@ func (f factory) MetricsToLogsStability() component.StabilityLevel { return f.metricsToLogsStabilityLevel } +func (f factory) MetricsToProfilesStability() component.StabilityLevel { + return f.metricsToProfilesStabilityLevel +} + func (f factory) LogsToTracesStability() component.StabilityLevel { return f.logsToTracesStabilityLevel } @@ -285,6 +439,26 @@ func (f factory) LogsToLogsStability() component.StabilityLevel { return f.logsToLogsStabilityLevel } +func (f factory) LogsToProfilesStability() component.StabilityLevel { + return f.logsToProfilesStabilityLevel +} + +func (f factory) ProfilesToProfilesStability() component.StabilityLevel { + return f.profilesToProfilesStabilityLevel +} + +func (f factory) ProfilesToTracesStability() component.StabilityLevel { + return f.profilesToTracesStabilityLevel +} + +func (f factory) ProfilesToMetricsStability() component.StabilityLevel { + return f.profilesToMetricsStabilityLevel +} + +func (f factory) ProfilesToLogsStability() component.StabilityLevel { + return f.profilesToLogsStabilityLevel +} + // NewFactory returns a Factory. func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory { f := &factory{ @@ -321,6 +495,14 @@ func WithTracesToLogs(createTracesToLogs CreateTracesToLogsFunc, sl component.St }) } +// WithTracesToProfiles overrides the default "error not supported" implementation for WithTracesToProfiles and the default "undefined" stability level. +func WithTracesToProfiles(createTracesToProfiles CreateTracesToProfilesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.tracesToProfilesStabilityLevel = sl + o.CreateTracesToProfilesFunc = createTracesToProfiles + }) +} + // WithMetricsToTraces overrides the default "error not supported" implementation for WithMetricsToTraces and the default "undefined" stability level. func WithMetricsToTraces(createMetricsToTraces CreateMetricsToTracesFunc, sl component.StabilityLevel) FactoryOption { return factoryOptionFunc(func(o *factory) { @@ -345,6 +527,14 @@ func WithMetricsToLogs(createMetricsToLogs CreateMetricsToLogsFunc, sl component }) } +// WithMetricsToProfiles overrides the default "error not supported" implementation for WithMetricsToProfiles and the default "undefined" stability level. +func WithMetricsToProfiles(createMetricsToProfiles CreateMetricsToProfilesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.metricsToProfilesStabilityLevel = sl + o.CreateMetricsToProfilesFunc = createMetricsToProfiles + }) +} + // WithLogsToTraces overrides the default "error not supported" implementation for WithLogsToTraces and the default "undefined" stability level. func WithLogsToTraces(createLogsToTraces CreateLogsToTracesFunc, sl component.StabilityLevel) FactoryOption { return factoryOptionFunc(func(o *factory) { @@ -369,6 +559,46 @@ func WithLogsToLogs(createLogsToLogs CreateLogsToLogsFunc, sl component.Stabilit }) } +// WithLogsToProfiles overrides the default "error not supported" implementation for WithLogsToProfiles and the default "undefined" stability level. +func WithLogsToProfiles(createLogsToProfiles CreateLogsToProfilesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.logsToProfilesStabilityLevel = sl + o.CreateLogsToProfilesFunc = createLogsToProfiles + }) +} + +// WithProfilesToProfiles overrides the default "error not supported" implementation for WithProfilesToProfiles and the default "undefined" stability level. +func WithProfilesToProfiles(createProfilesToProfiles CreateProfilesToProfilesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.profilesToProfilesStabilityLevel = sl + o.CreateProfilesToProfilesFunc = createProfilesToProfiles + }) +} + +// WithProfilesToTraces overrides the default "error not supported" implementation for WithProfilesToTraces and the default "undefined" stability level. +func WithProfilesToTraces(createProfilesToTraces CreateProfilesToTracesFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.profilesToTracesStabilityLevel = sl + o.CreateProfilesToTracesFunc = createProfilesToTraces + }) +} + +// WithProfilesToMetrics overrides the default "error not supported" implementation for WithProfilesToMetrics and the default "undefined" stability level. +func WithProfilesToMetrics(createProfilesToMetrics CreateProfilesToMetricsFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.profilesToMetricsStabilityLevel = sl + o.CreateProfilesToMetricsFunc = createProfilesToMetrics + }) +} + +// WithProfilesToLogs overrides the default "error not supported" implementation for WithProfilesToLogs and the default "undefined" stability level. +func WithProfilesToLogs(createProfilesToLogs CreateProfilesToLogsFunc, sl component.StabilityLevel) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.profilesToLogsStabilityLevel = sl + o.CreateProfilesToLogsFunc = createProfilesToLogs + }) +} + func ErrDataTypes(id component.ID, from, to component.DataType) error { return fmt.Errorf("connector %q cannot connect from %s to %s: %w", id, from, to, component.ErrDataTypeIsNotSupported) } diff --git a/connector/internal/profiles.go b/connector/internal/profiles.go new file mode 100644 index 00000000000..4ac7889cd94 --- /dev/null +++ b/connector/internal/profiles.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/connector/internal" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer/consumerprofiles" +) + +// A Profiles connector acts as an exporter from a profiles pipeline and a receiver +// to one or more traces, metrics, logs, or profiles pipelines. +// Profiles feeds a consumer.Traces, consumer.Metrics, consumer.Logs, or consumerprofiles.Profiles with data. +// +// Examples: +// - Profiles could be collected in one pipeline and routed to another profiles pipeline +// based on criteria such as attributes or other content of the profile. The second +// pipeline can then process and export the profile to the appropriate backend. +// - Profiles could be summarized by a metrics connector that emits statistics describing +// the number of profiles observed. +// - Profiles could be analyzed by a logs connector that emits events when particular +// criteria are met. +type Profiles interface { + component.Component + consumerprofiles.Profiles +} diff --git a/otelcol/go.mod b/otelcol/go.mod index ebc457f87e5..5ade2d95f0f 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -62,6 +62,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector v0.106.1 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/consumer v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumertest v0.106.1 // indirect @@ -152,4 +153,6 @@ replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/c replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest +replace go.opentelemetry.io/collector/component/componentprofiles => ../component/componentprofiles + replace go.opentelemetry.io/collector/client => ../client diff --git a/otelcol/otelcoltest/go.mod b/otelcol/otelcoltest/go.mod index bc229f26f83..c287ba0b5bd 100644 --- a/otelcol/otelcoltest/go.mod +++ b/otelcol/otelcoltest/go.mod @@ -59,6 +59,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector v0.106.1 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.106.1 // indirect go.opentelemetry.io/collector/consumer v0.106.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect @@ -170,4 +171,6 @@ replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consume replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest +replace go.opentelemetry.io/collector/component/componentprofiles => ../../component/componentprofiles + replace go.opentelemetry.io/collector/client => ../../client diff --git a/service/go.mod b/service/go.mod index 8544fc26302..9dbe6596b81 100644 --- a/service/go.mod +++ b/service/go.mod @@ -78,6 +78,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/client v0.106.1 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/config/configauth v0.106.1 // indirect go.opentelemetry.io/collector/config/configcompression v1.12.0 // indirect go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect @@ -161,4 +162,6 @@ replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/c replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest +replace go.opentelemetry.io/collector/component/componentprofiles => ../component/componentprofiles + replace go.opentelemetry.io/collector/client => ../client diff --git a/versions.yaml b/versions.yaml index 28d454d7549..606e786e4b6 100644 --- a/versions.yaml +++ b/versions.yaml @@ -36,6 +36,7 @@ module-sets: - go.opentelemetry.io/collector/config/configtelemetry - go.opentelemetry.io/collector/config/internal - go.opentelemetry.io/collector/connector + - go.opentelemetry.io/collector/connector/connectorprofiles - go.opentelemetry.io/collector/connector/forwardconnector - go.opentelemetry.io/collector/consumer - go.opentelemetry.io/collector/consumer/consumerprofiles From 2bb26132cd6e616f21940053e3e38c9a8331c8a5 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 1 Aug 2024 02:36:55 -0600 Subject: [PATCH 09/19] [component] Remove deprecated `Host.GetFactory` method (#10771) #### Description Removes the deprecated `GetFactory` method from the `component.Host` interface #### Link to tracking issue Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9511 --- .../component-remove-deprecated-method.yaml | 25 +++++++++++++++++++ component/host.go | 15 ----------- 2 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 .chloggen/component-remove-deprecated-method.yaml diff --git a/.chloggen/component-remove-deprecated-method.yaml b/.chloggen/component-remove-deprecated-method.yaml new file mode 100644 index 00000000000..f17e273ec5f --- /dev/null +++ b/.chloggen/component-remove-deprecated-method.yaml @@ -0,0 +1,25 @@ +# 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: component + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removes the deprecated `Host.GetFactory` method. + +# One or more tracking issues or pull requests related to the change +issues: [10771] + +# (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] diff --git a/component/host.go b/component/host.go index 5c63868629c..dc8210ffbe3 100644 --- a/component/host.go +++ b/component/host.go @@ -10,21 +10,6 @@ package component // import "go.opentelemetry.io/collector/component" // The component is expected to cast the `component.Host` to the interface it needs and return // an error if the type assertion fails. type Host interface { - // 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 { - // apacheFactory := host.GetFactory(KindReceiver,"apache").(receiver.Factory) - // receiver, err := apacheFactory.CreateMetrics(...) - // ... - // } - // - // GetFactory can be called by the component anytime after Component.Start() begins and - // until Component.Shutdown() ends. Note that the component is responsible for destroying - // other components that it creates. - // - // Deprecated: [v0.106.0] component.Host no longer requires implementors to expose a GetFactory function. - GetFactory(kind Kind, componentType Type) Factory - // GetExtensions returns the map of extensions. Only enabled and created extensions will be returned. // Typically, it is used to find an extension by type or by full config name. Both cases // can be done by iterating the returned map. There are typically very few extensions, From 88adaefe6c380fffa203086792777b847e577260 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 1 Aug 2024 14:54:08 -0700 Subject: [PATCH 10/19] Make @pjanotti owner of windows/amd64 (#10788) I'm volunteering myself to own the tier 2 support for windows/amd64. This will put the windows/amd64 on par with the other tier 2 platforms by having a specific person owning it. Some of Windows related things that I contribute(d): * Codeowner of various Windows related components in contrib (pkg/winperfcounters, activedirectorydsreceiver, iisreceiver, windowseventlogreceiver, and windowsperfcountersreceiver) * Fixing Windows related issues (e.g.: #9042, #9689, #9726, https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30743) * MSI on the collector releases repo (https://github.com/open-telemetry/opentelemetry-collector-releases/pull/560) --- docs/platform-support.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/docs/platform-support.md b/docs/platform-support.md index 4938b13b8f6..2a63faea5b1 100644 --- a/docs/platform-support.md +++ b/docs/platform-support.md @@ -47,27 +47,24 @@ Tier 1 platforms are currently: 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) | -|---------------|-------------------------------------------------------------------------------------------------------------| -| darwin/arm64 | [@MovieStoreGuy](https://github.com/MovieStoreGuy) | -| linux/arm64 | [@atoulme](https://github.com/atoulme) | -| windows/amd64 | [OpenTelemetry Collector approvers](https://github.com/open-telemetry/opentelemetry-collector#contributing) | - +| Platform | Owner(s) | +|---------------|----------------------------------------------------| +| darwin/arm64 | [@MovieStoreGuy](https://github.com/MovieStoreGuy) | +| linux/arm64 | [@atoulme](https://github.com/atoulme) | +| windows/amd64 | [@pjanotti](https://github.com/pjanotti) | ### 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) | -| linux/386 | [@andrzej-stencel](https://github.com/andrzej-stencel) | -| 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) | +| Platform | Owner(s) | +|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| darwin/amd64 | [@h0cheung](https://github.com/h0cheung) | +| linux/386 | [@andrzej-stencel](https://github.com/andrzej-stencel) | +| 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. - - From 2beed98471f066a50da6d5f6952122fa1f067638 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 2 Aug 2024 11:36:15 +0200 Subject: [PATCH 11/19] [confmap] Validate providers scheme when building a Resolver (#10786) #### Description Validate providers schemes when building a Resolver. I don't consider this a breaking change since the providers would be useless if they don't follow this pattern. --- .../mx-psi_restrict-providers-scheme.yaml | 25 +++++++++++++++++++ confmap/expand_test.go | 13 +++------- confmap/resolver.go | 12 ++++++++- confmap/resolver_test.go | 9 +++++-- 4 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 .chloggen/mx-psi_restrict-providers-scheme.yaml diff --git a/.chloggen/mx-psi_restrict-providers-scheme.yaml b/.chloggen/mx-psi_restrict-providers-scheme.yaml new file mode 100644 index 00000000000..e96b51f6408 --- /dev/null +++ b/.chloggen/mx-psi_restrict-providers-scheme.yaml @@ -0,0 +1,25 @@ +# 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: confmap + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Check that providers have a correct scheme when building a confmap.Resolver. + +# One or more tracking issues or pull requests related to the change +issues: [10786] + +# (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] diff --git a/confmap/expand_test.go b/confmap/expand_test.go index 53b244374b1..5b87d747543 100644 --- a/confmap/expand_test.go +++ b/confmap/expand_test.go @@ -61,11 +61,8 @@ func TestResolverDoneNotExpandOldEnvVars(t *testing.T) { envProvider := newFakeProvider("env", func(context.Context, string, WatcherFunc) (*Retrieved, error) { return NewRetrieved("some string") }) - emptySchemeProvider := newFakeProvider("", func(context.Context, string, WatcherFunc) (*Retrieved, error) { - return NewRetrieved("some string") - }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"test:"}, ProviderFactories: []ProviderFactory{fileProvider, envProvider, emptySchemeProvider}, ConverterFactories: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"test:"}, 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. @@ -509,12 +506,8 @@ func TestResolverExpandInvalidScheme(t *testing.T) { panic("must not be called") }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) - require.NoError(t, err) - - _, err = resolver.Resolve(context.Background()) - - assert.EqualError(t, err, `invalid uri: "g_c_s:VALUE"`) + _, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) + assert.ErrorContains(t, err, "invalid 'confmap.Provider' scheme") } func TestResolverExpandInvalidOpaqueValue(t *testing.T) { diff --git a/confmap/resolver.go b/confmap/resolver.go index 7b7de3d5092..f3a7c7092e3 100644 --- a/confmap/resolver.go +++ b/confmap/resolver.go @@ -96,7 +96,17 @@ func NewResolver(set ResolverSettings) (*Resolver, error) { providers := make(map[string]Provider, len(set.ProviderFactories)) for _, factory := range set.ProviderFactories { provider := factory.Create(set.ProviderSettings) - providers[provider.Scheme()] = provider + scheme := provider.Scheme() + // Check that the scheme follows the pattern. + if !regexp.MustCompile(schemePattern).MatchString(scheme) { + return nil, fmt.Errorf("invalid 'confmap.Provider' scheme %q", scheme) + } + // Check that the scheme is unique. + if _, ok := providers[scheme]; ok { + return nil, fmt.Errorf("duplicate 'confmap.Provider' scheme %q", scheme) + } + + providers[scheme] = provider } if set.DefaultScheme != "" { diff --git a/confmap/resolver_test.go b/confmap/resolver_test.go index fecb973d089..e939d124acb 100644 --- a/confmap/resolver_test.go +++ b/confmap/resolver_test.go @@ -113,11 +113,16 @@ func (m *mockConverter) Convert(context.Context, *Conf) error { return errors.New("converter_err") } -func TestNewResolverInvalidScheme(t *testing.T) { - _, err := NewResolver(ResolverSettings{URIs: []string{"s_3:has invalid char"}, ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{scheme: "s_3"})}}) +func TestNewResolverInvalidSchemeInURI(t *testing.T) { + _, err := NewResolver(ResolverSettings{URIs: []string{"s_3:has invalid char"}, ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{scheme: "s3"})}}) assert.EqualError(t, err, `invalid uri: "s_3:has invalid char"`) } +func TestNewResolverDuplicateScheme(t *testing.T) { + _, err := NewResolver(ResolverSettings{URIs: []string{"mock:something"}, ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{scheme: "mock"}), newMockProvider(&mockProvider{scheme: "mock"})}}) + assert.EqualError(t, err, `duplicate 'confmap.Provider' scheme "mock"`) +} + func TestResolverErrors(t *testing.T) { tests := []struct { name string From 3c23a228abcc43273ce8be56fc67a9bf1d1693cc Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 2 Aug 2024 05:53:52 -0600 Subject: [PATCH 12/19] [chore] set fail-fast to false for contrib tests (#10791) Continuation of https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32333. This should help us identify more components that break with Core changes. --- .github/workflows/contrib-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index 42f5f3d00c2..7319c8a6f91 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -20,6 +20,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }} strategy: + fail-fast: false matrix: group: - receiver-0 From 73afc2534d1ed031846c3227166d3da48d0a226b Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Fri, 2 Aug 2024 04:54:07 -0700 Subject: [PATCH 13/19] [otelcol] Delete deprecated NewCommandMustSetProvider (#10778) --- .chloggen/NewCommandMustSetProvider.yaml | 25 ++++++++++++++++++++++++ otelcol/command.go | 11 ----------- 2 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .chloggen/NewCommandMustSetProvider.yaml diff --git a/.chloggen/NewCommandMustSetProvider.yaml b/.chloggen/NewCommandMustSetProvider.yaml new file mode 100644 index 00000000000..742b1c8ada0 --- /dev/null +++ b/.chloggen/NewCommandMustSetProvider.yaml @@ -0,0 +1,25 @@ +# 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: otelcol + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Delete deprecated NewCommandMustSetProvider + +# One or more tracking issues or pull requests related to the change +issues: [10778] + +# (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] diff --git a/otelcol/command.go b/otelcol/command.go index b75c0b29fa8..3eaeeee6c5a 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -43,17 +43,6 @@ func NewCommand(set CollectorSettings) *cobra.Command { return rootCmd } -// NewCommandMustSetProvider 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. -// At least one Provider must be supplied via CollectorSettings.ConfigProviderSettings.ResolverSettings.ProviderFactories. -// -// Deprecated: [v0.104.0] use NewCommand instead -func NewCommandMustSetProvider(set CollectorSettings) *cobra.Command { - return NewCommand(set) -} - // Puts command line flags from flags into the CollectorSettings, to be used during config resolution. func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error { resolverSet := &set.ConfigProviderSettings.ResolverSettings From afefb7464ee00494e93ff76ef5d554a9d46c91b0 Mon Sep 17 00:00:00 2001 From: Daniel Jaglowski Date: Fri, 2 Aug 2024 09:05:48 -0500 Subject: [PATCH 14/19] [chore] Add readonly matrix test. Remove invalid mutability assertions (#10632) The primary objective here was to add new test cases for the graph. However, I found that mutability assertions added in #8634 appear to be nondeterministic. Therefore, important test cases cannot be covered with them in place. This effectively removes the assertions about mutability for now. @dmitryax, I'm curious if you have better ideas here. I am thinking that perhaps it would be better to have an entirely separate set of test cases which are focused on mutability expectations. Co-authored-by: Pablo Baeyens --- service/internal/graph/graph_test.go | 77 ++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 16 deletions(-) diff --git a/service/internal/graph/graph_test.go b/service/internal/graph/graph_test.go index e20b85b2961..fcc2ea6cf89 100644 --- a/service/internal/graph/graph_test.go +++ b/service/internal/graph/graph_test.go @@ -569,7 +569,43 @@ func TestConnectorPipelinesGraph(t *testing.T) { expectedPerExporter: 1, }, { - name: "pipelines_conn_matrix.yaml", + name: "pipelines_conn_matrix_immutable.yaml", + pipelineConfigs: pipelines.Config{ + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, + }, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, + }, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, + }, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + }, + expectedPerExporter: 3, + }, + { + name: "pipelines_conn_matrix_mutable.yaml", pipelineConfigs: pipelines.Config{ component.MustNewIDWithName("traces", "in"): { Receivers: []component.ID{component.MustNewID("examplereceiver")}, @@ -949,34 +985,43 @@ 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 - } + expectedMutable := testdata.GenerateTraces(1) + expectedReadOnly := testdata.GenerateTraces(1) + expectedReadOnly.MarkReadOnly() for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, expected, tracesExporter.Traces[i]) + if tracesExporter.Traces[i].IsReadOnly() { + assert.EqualValues(t, expectedReadOnly, tracesExporter.Traces[i]) + } else { + assert.EqualValues(t, expectedMutable, tracesExporter.Traces[i]) + } } } 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 - } + expectedMutable := testdata.GenerateMetrics(1) + expectedReadOnly := testdata.GenerateMetrics(1) + expectedReadOnly.MarkReadOnly() for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, expected, metricsExporter.Metrics[i]) + if metricsExporter.Metrics[i].IsReadOnly() { + assert.EqualValues(t, expectedReadOnly, metricsExporter.Metrics[i]) + } else { + assert.EqualValues(t, expectedMutable, metricsExporter.Metrics[i]) + } } } 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 - } + expectedMutable := testdata.GenerateLogs(1) + expectedReadOnly := testdata.GenerateLogs(1) + expectedReadOnly.MarkReadOnly() for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, expected, logsExporter.Logs[i]) + if logsExporter.Logs[i].IsReadOnly() { + assert.EqualValues(t, expectedReadOnly, logsExporter.Logs[i]) + } else { + assert.EqualValues(t, expectedMutable, logsExporter.Logs[i]) + } } } }) From 685625abb4703cb2e45a397f008127bbe2ba4c0e Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 2 Aug 2024 08:15:28 -0600 Subject: [PATCH 15/19] [chore] remove vmmeter from `build-and-test.yaml` (#10590) These things were added for the [arm build](https://github.com/open-telemetry/opentelemetry-collector/pull/9584) which has been moved to its own job. Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10587 --- .github/workflows/build-and-test.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2e6903585f4..55cd469832d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -145,13 +145,6 @@ jobs: runs-on: ${{ matrix.runner }} needs: [setup-environment] steps: - - name: Set up arkade - 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@c7e2162e39294a810cab647cacc215ecd68a44f6 # v1 - name: Checkout Repo uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Go From 78df5c72436e6aaefcfda211c90980664104a2b8 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 5 Aug 2024 10:15:46 +0200 Subject: [PATCH 16/19] [confmap] Use values as string if YAML is invalid (#10794) #### Description If YAML parsing fails, assume the user wanted to pass the value as a string. This has the downside that the error messages are less informative: it will tell you it expected something other than a string instead of the YAML parser error. A future improvement could be to pass these errors down as extra metadata up until the unmarshaling stage. #### Link to tracking issue Fixes #10759 #### Testing Added test case for this. --- .chloggen/mx-psi_fix-invalid-yaml-string.yaml | 26 +++++++++++++++++++ confmap/internal/e2e/types_test.go | 11 ++++++++ confmap/provider.go | 5 ++++ confmap/provider/envprovider/provider_test.go | 9 ++++--- .../provider/fileprovider/provider_test.go | 16 +++++++++--- .../configurablehttpprovider/provider_test.go | 7 +++-- .../provider/yamlprovider/provider_test.go | 9 +++++-- confmap/provider_test.go | 13 +++++++++- 8 files changed, 84 insertions(+), 12 deletions(-) create mode 100644 .chloggen/mx-psi_fix-invalid-yaml-string.yaml diff --git a/.chloggen/mx-psi_fix-invalid-yaml-string.yaml b/.chloggen/mx-psi_fix-invalid-yaml-string.yaml new file mode 100644 index 00000000000..01af9d41f68 --- /dev/null +++ b/.chloggen/mx-psi_fix-invalid-yaml-string.yaml @@ -0,0 +1,26 @@ +# 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: confmap + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: If loading an invalid YAML string through a provider, use it verbatim instead of erroring out. + +# One or more tracking issues or pull requests related to the change +issues: [10759] + +# (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: | + This makes the ${env:ENV} syntax closer to how ${ENV} worked before unifying syntaxes. + +# 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/confmap/internal/e2e/types_test.go b/confmap/internal/e2e/types_test.go index 30b763d8be1..cb04b5d30f4 100644 --- a/confmap/internal/e2e/types_test.go +++ b/confmap/internal/e2e/types_test.go @@ -345,6 +345,17 @@ func TestStrictTypeCasting(t *testing.T) { targetField: TargetFieldInlineString, expected: "inline field with 2006-01-02T15:04:05Z07:00 expansion", }, + // issue 10759 + { + value: `["a",`, + targetField: TargetFieldString, + expected: `["a",`, + }, + { + value: `["a",`, + targetField: TargetFieldInlineString, + expected: `inline field with ["a", expansion`, + }, } previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() diff --git a/confmap/provider.go b/confmap/provider.go index 3338d72bddf..b78221d34ae 100644 --- a/confmap/provider.go +++ b/confmap/provider.go @@ -137,6 +137,11 @@ func withStringRepresentation(stringRepresentation string) RetrievedOption { func NewRetrievedFromYAML(yamlBytes []byte, opts ...RetrievedOption) (*Retrieved, error) { var rawConf any if err := yaml.Unmarshal(yamlBytes, &rawConf); err != nil { + if globalgates.StrictlyTypedInputGate.IsEnabled() { + // If the string is not valid YAML, we try to use it verbatim as a string. + strRep := string(yamlBytes) + return NewRetrieved(strRep, append(opts, withStringRepresentation(strRep))...) + } return nil, err } diff --git a/confmap/provider/envprovider/provider_test.go b/confmap/provider/envprovider/provider_test.go index 1e89d542618..1f4b99c8318 100644 --- a/confmap/provider/envprovider/provider_test.go +++ b/confmap/provider/envprovider/provider_test.go @@ -47,11 +47,14 @@ func TestUnsupportedScheme(t *testing.T) { } func TestInvalidYAML(t *testing.T) { - const envName = "invalid-yaml" + const envName = "invalid_yaml" t.Setenv(envName, "[invalid,") env := createProvider() - _, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) - assert.Error(t, err) + ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) + require.NoError(t, err) + raw, err := ret.AsRaw() + require.NoError(t, err) + assert.IsType(t, "", raw) assert.NoError(t, env.Shutdown(context.Background())) } diff --git a/confmap/provider/fileprovider/provider_test.go b/confmap/provider/fileprovider/provider_test.go index 022bf8f1758..6d1182b00d1 100644 --- a/confmap/provider/fileprovider/provider_test.go +++ b/confmap/provider/fileprovider/provider_test.go @@ -47,10 +47,18 @@ func TestNonExistent(t *testing.T) { func TestInvalidYAML(t *testing.T) { 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) - assert.Error(t, err) + ret, err := fp.Retrieve(context.Background(), fileSchemePrefix+filepath.Join("testdata", "invalid-yaml.yaml"), nil) + require.NoError(t, err) + raw, err := ret.AsRaw() + require.NoError(t, err) + assert.IsType(t, "", raw) + + ret, err = fp.Retrieve(context.Background(), fileSchemePrefix+absolutePath(t, filepath.Join("testdata", "invalid-yaml.yaml")), nil) + require.NoError(t, err) + raw, err = ret.AsRaw() + require.NoError(t, err) + assert.IsType(t, "", raw) + require.NoError(t, fp.Shutdown(context.Background())) } diff --git a/confmap/provider/internal/configurablehttpprovider/provider_test.go b/confmap/provider/internal/configurablehttpprovider/provider_test.go index 0561d51030a..f140a2bce86 100644 --- a/confmap/provider/internal/configurablehttpprovider/provider_test.go +++ b/confmap/provider/internal/configurablehttpprovider/provider_test.go @@ -282,8 +282,11 @@ func TestInvalidYAML(t *testing.T) { } })) defer ts.Close() - _, err := fp.Retrieve(context.Background(), ts.URL, nil) - assert.Error(t, err) + ret, err := fp.Retrieve(context.Background(), ts.URL, nil) + require.NoError(t, err) + raw, err := ret.AsRaw() + require.NoError(t, err) + assert.Equal(t, "wrong : [", raw) require.NoError(t, fp.Shutdown(context.Background())) } diff --git a/confmap/provider/yamlprovider/provider_test.go b/confmap/provider/yamlprovider/provider_test.go index 4abee7e8580..8959bb0de5a 100644 --- a/confmap/provider/yamlprovider/provider_test.go +++ b/confmap/provider/yamlprovider/provider_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -26,8 +27,12 @@ func TestEmpty(t *testing.T) { func TestInvalidYAML(t *testing.T) { sp := createProvider() - _, err := sp.Retrieve(context.Background(), "yaml:[invalid,", nil) - assert.Error(t, err) + ret, err := sp.Retrieve(context.Background(), "yaml:[invalid,", nil) + require.NoError(t, err) + raw, err := ret.AsRaw() + require.NoError(t, err) + assert.IsType(t, "", raw) + assert.NoError(t, sp.Shutdown(context.Background())) } diff --git a/confmap/provider_test.go b/confmap/provider_test.go index e168b49fa6a..32554a52478 100644 --- a/confmap/provider_test.go +++ b/confmap/provider_test.go @@ -56,8 +56,19 @@ func TestNewRetrievedFromYAMLWithOptions(t *testing.T) { } func TestNewRetrievedFromYAMLInvalidYAMLBytes(t *testing.T) { - _, err := NewRetrievedFromYAML([]byte("[invalid:,")) + ret, err := NewRetrievedFromYAML([]byte("[invalid:,")) + require.NoError(t, err) + + _, err = ret.AsConf() assert.Error(t, err) + + str, err := ret.AsString() + require.NoError(t, err) + assert.Equal(t, "[invalid:,", str) + + raw, err := ret.AsRaw() + require.NoError(t, err) + assert.Equal(t, "[invalid:,", raw) } func TestNewRetrievedFromYAMLInvalidAsMap(t *testing.T) { From 6f2729780d3ca32e1ed81e554d17e9b5f2c95fa1 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 5 Aug 2024 13:07:26 +0200 Subject: [PATCH 17/19] [confmap] Remove original representation if invalid (#10795) #### Description Removes original string representation if invalid. #### Link to tracking issue Fixes #10787 #### Testing Added e2e test cases --- .chloggen/mx-psi_remove-has-original.yaml | 25 ++++ confmap/confmap.go | 3 - confmap/confmap_test.go | 5 +- confmap/expand.go | 30 ++-- .../e2e/testdata/issue-10787-main.yaml | 22 +++ .../e2e/testdata/issue-10787-snippet.yaml | 3 + confmap/internal/e2e/types_test.go | 130 ++++++++++++++++++ 7 files changed, 193 insertions(+), 25 deletions(-) create mode 100644 .chloggen/mx-psi_remove-has-original.yaml create mode 100644 confmap/internal/e2e/testdata/issue-10787-main.yaml create mode 100644 confmap/internal/e2e/testdata/issue-10787-snippet.yaml diff --git a/.chloggen/mx-psi_remove-has-original.yaml b/.chloggen/mx-psi_remove-has-original.yaml new file mode 100644 index 00000000000..9f1417fca57 --- /dev/null +++ b/.chloggen/mx-psi_remove-has-original.yaml @@ -0,0 +1,25 @@ +# 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: confmap + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove original string representation if invalid. + +# One or more tracking issues or pull requests related to the change +issues: [10787] + +# (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/confmap/confmap.go b/confmap/confmap.go index 59524527b06..4e881f9d804 100644 --- a/confmap/confmap.go +++ b/confmap/confmap.go @@ -240,9 +240,6 @@ func caseSensitiveMatchName(a, b string) bool { func castTo(exp expandedValue, useOriginal bool) (any, error) { // If the target field is a string, use `exp.Original` or fail if not available. if globalgates.StrictlyTypedInputGate.IsEnabled() && useOriginal { - if !exp.HasOriginal { - return nil, fmt.Errorf("cannot expand value to string: original value not set") - } return exp.Original, nil } // Otherwise, use the parsed value (previous behavior). diff --git a/confmap/confmap_test.go b/confmap/confmap_test.go index 713583a7115..ac48d0359e6 100644 --- a/confmap/confmap_test.go +++ b/confmap/confmap_test.go @@ -849,9 +849,8 @@ func TestRecursiveUnmarshaling(t *testing.T) { func TestExpandedValue(t *testing.T) { cm := NewFromStringMap(map[string]any{ "key": expandedValue{ - Value: 0xdeadbeef, - HasOriginal: true, - Original: "original", + Value: 0xdeadbeef, + Original: "original", }}) assert.Equal(t, 0xdeadbeef, cm.Get("key")) assert.Equal(t, map[string]any{"key": 0xdeadbeef}, cm.ToStringMap()) diff --git a/confmap/expand.go b/confmap/expand.go index 56dc512382b..09e1907eeb6 100644 --- a/confmap/expand.go +++ b/confmap/expand.go @@ -58,25 +58,19 @@ func (mr *Resolver) expandValue(ctx context.Context, value any) (any, bool, erro // At this point we don't know the target field type, so we need to expand the original representation as well. originalExpanded, originalChanged, err := mr.expandValue(ctx, v.Original) if err != nil { - return nil, false, err + // The original representation is not valid, return the expanded value. + return expanded, changed, nil } if originalExpanded, ok := originalExpanded.(string); ok { // If the original representation is a string, return the expanded value with the original representation. return expandedValue{ - Value: expanded, - Original: originalExpanded, - HasOriginal: true, + Value: expanded, + Original: originalExpanded, }, changed || originalChanged, nil } - result := expandedValue{ - Value: expanded, - Original: v.Original, - HasOriginal: v.HasOriginal, - } - - return result, changed || originalChanged, nil + return expanded, changed, nil case string: if !strings.Contains(v, "${") || !strings.Contains(v, "}") { // No URIs to expand. @@ -158,10 +152,7 @@ func (mr *Resolver) findURI(input string) string { type expandedValue struct { // Value is the expanded value. Value any - // HasOriginal is true if the original representation is set. - HasOriginal bool // Original is the original representation of the value. - // It is only valid if HasOriginal is true. Original string } @@ -182,18 +173,19 @@ func (mr *Resolver) findAndExpandURI(ctx context.Context, input string) (any, bo return input, false, err } - expanded := expandedValue{} - expanded.Value, err = ret.AsRaw() + val, err := ret.AsRaw() if err != nil { return input, false, err } if asStr, err2 := ret.AsString(); err2 == nil { - expanded.HasOriginal = true - expanded.Original = asStr + return expandedValue{ + Value: val, + Original: asStr, + }, true, nil } - return expanded, true, err + return val, true, nil } expanded, err := mr.expandURI(ctx, uri) if err != nil { diff --git a/confmap/internal/e2e/testdata/issue-10787-main.yaml b/confmap/internal/e2e/testdata/issue-10787-main.yaml new file mode 100644 index 00000000000..08bb0e61756 --- /dev/null +++ b/confmap/internal/e2e/testdata/issue-10787-main.yaml @@ -0,0 +1,22 @@ +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 +processors: + batch: + +exporters: + ${file:testdata/issue-10787-snippet.yaml} + +service: + telemetry: + metrics: + level: detailed + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [logging] diff --git a/confmap/internal/e2e/testdata/issue-10787-snippet.yaml b/confmap/internal/e2e/testdata/issue-10787-snippet.yaml new file mode 100644 index 00000000000..13872dcd46a --- /dev/null +++ b/confmap/internal/e2e/testdata/issue-10787-snippet.yaml @@ -0,0 +1,3 @@ +# ${hello.world} +logging: + verbosity: detailed diff --git a/confmap/internal/e2e/types_test.go b/confmap/internal/e2e/types_test.go index cb04b5d30f4..c96847f9c8d 100644 --- a/confmap/internal/e2e/types_test.go +++ b/confmap/internal/e2e/types_test.go @@ -8,6 +8,7 @@ import ( "path/filepath" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/confmap" @@ -24,6 +25,7 @@ const ( TargetFieldString TargetField = "string_field" TargetFieldBool TargetField = "bool_field" TargetFieldInlineString TargetField = "inline_string_field" + TargetFieldSlice TargetField = "slice_field" ) type Test struct { @@ -78,6 +80,9 @@ func AssertResolvesTo(t *testing.T, resolver *confmap.Resolver, tt Test) { case TargetFieldBool: var cfg TargetConfig[bool] AssertExpectedMatch(t, tt, conf, &cfg) + case TargetFieldSlice: + var cfg TargetConfig[[]any] + AssertExpectedMatch(t, tt, conf, &cfg) default: t.Fatalf("unexpected target field %q", tt.targetField) } @@ -345,6 +350,22 @@ func TestStrictTypeCasting(t *testing.T) { targetField: TargetFieldInlineString, expected: "inline field with 2006-01-02T15:04:05Z07:00 expansion", }, + // issue 10787 + { + value: "true # comment with a ${env:hello.world} reference", + targetField: TargetFieldBool, + expected: true, + }, + { + value: "true # comment with a ${env:hello.world} reference", + targetField: TargetFieldString, + unmarshalErr: `expected type 'string', got unconvertible type 'bool'`, + }, + { + value: "true # comment with a ${env:hello.world} reference", + targetField: TargetFieldInlineString, + resolveErr: `environment variable "hello.world" has invalid name`, + }, // issue 10759 { value: `["a",`, @@ -356,6 +377,12 @@ func TestStrictTypeCasting(t *testing.T) { targetField: TargetFieldInlineString, expected: `inline field with ["a", expansion`, }, + // issue 10799 + { + value: `[filelog,windowseventlog/application]`, + targetField: TargetFieldSlice, + expected: []any{"filelog", "windowseventlog/application"}, + }, } previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() @@ -494,3 +521,106 @@ func TestRecursiveMaps(t *testing.T) { cfgStr.Field, ) } + +// Test that comments with invalid ${env:...} references do not prevent configuration from loading. +func TestIssue10787(t *testing.T) { + previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, true) + require.NoError(t, err) + defer func() { + seterr := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, previousValue) + require.NoError(t, seterr) + }() + + resolver := NewResolver(t, "issue-10787-main.yaml") + conf, err := resolver.Resolve(context.Background()) + require.NoError(t, err) + assert.Equal(t, conf.ToStringMap(), + map[string]any{ + "exporters": map[string]any{ + "logging": map[string]any{ + "verbosity": "detailed", + }, + }, + "processors": map[string]any{ + "batch": nil, + }, + "receivers": map[string]any{ + "otlp": map[string]any{ + "protocols": map[string]any{ + "grpc": map[string]any{ + "endpoint": "0.0.0.0:4317", + }, + "http": map[string]any{ + "endpoint": "0.0.0.0:4318", + }, + }, + }, + }, + "service": map[string]any{ + "pipelines": map[string]any{ + "traces": map[string]any{ + "exporters": []any{"logging"}, + "processors": []any{"batch"}, + "receivers": []any{"otlp"}, + }, + }, + "telemetry": map[string]any{ + "metrics": map[string]any{ + "level": "detailed", + }, + }, + }, + }, + ) +} + +func TestStructMappingIssue10787(t *testing.T) { + previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, true) + require.NoError(t, err) + defer func() { + seterr := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, previousValue) + require.NoError(t, seterr) + }() + + resolver := NewResolver(t, "types_expand.yaml") + t.Setenv("ENV", `# ${hello.world} +logging: + verbosity: detailed`) + conf, err := resolver.Resolve(context.Background()) + require.NoError(t, err) + + type Logging struct { + Verbosity string `mapstructure:"verbosity"` + } + type Exporters struct { + Logging Logging `mapstructure:"logging"` + } + type Target struct { + Field Exporters `mapstructure:"field"` + } + + var cfg Target + err = conf.Unmarshal(&cfg) + require.NoError(t, err) + require.Equal(t, + Target{Field: Exporters{ + Logging: Logging{ + Verbosity: "detailed", + }, + }}, + cfg, + ) + + confStr, err := resolver.Resolve(context.Background()) + require.NoError(t, err) + var cfgStr TargetConfig[string] + err = confStr.Unmarshal(&cfgStr) + require.NoError(t, err) + require.Equal(t, `# ${hello.world} +logging: + verbosity: detailed`, + cfgStr.Field, + ) +} From 7c2002af7e12d4e733e5f5824ed7f213b835902c Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 5 Aug 2024 04:31:58 -0700 Subject: [PATCH 18/19] [client] mark module as stable (#10775) #### Description Mark module as stable. #### Link to tracking issue Fixes #9795 --- .chloggen/stabilize_client.yaml | 25 +++++++++++++++++++++++++ versions.yaml | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .chloggen/stabilize_client.yaml diff --git a/.chloggen/stabilize_client.yaml b/.chloggen/stabilize_client.yaml new file mode 100644 index 00000000000..aeabbbd7e6a --- /dev/null +++ b/.chloggen/stabilize_client.yaml @@ -0,0 +1,25 @@ +# 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: client + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Mark module as stable. + +# One or more tracking issues or pull requests related to the change +issues: [10775] + +# (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/versions.yaml b/versions.yaml index 606e786e4b6..f5f47a5f32f 100644 --- a/versions.yaml +++ b/versions.yaml @@ -5,6 +5,7 @@ module-sets: stable: version: v1.12.0 modules: + - go.opentelemetry.io/collector/client - go.opentelemetry.io/collector/featuregate - go.opentelemetry.io/collector/pdata - go.opentelemetry.io/collector/config/configopaque @@ -16,7 +17,6 @@ module-sets: modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/internal/globalgates - - go.opentelemetry.io/collector/client - go.opentelemetry.io/collector/cmd/builder - go.opentelemetry.io/collector/cmd/mdatagen - go.opentelemetry.io/collector/component From 93cbae436ae61b832279dbbb18a0d99214b7d305 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 5 Aug 2024 17:51:55 +0200 Subject: [PATCH 19/19] [confmap] Allow using any type as a string (#10800) #### Description Allows any type to be used as a string if the target field is a string or the value is expanded in inline position. Inspired by #10794. This is not a breaking change (previously we would return an error for these). Some things that you can do after this PR that you couldn't do before it: 1. Set `HOST` to `[2001:db8::8a2e:370:7334]` and use it in an endpoint: ```yaml exporters: otlp: endpoint: http://${env:HOST}/api/v1/traces ``` 2. Pass really big numbers as strings (e.g. `10000000000000000000`) 3. Pass `null` as a string.
Types that can be returned by our current YAML parser Our current way of using the YAML parser has these types: `string`, `nil`, `int`, `uint64`, `float64`, `map[any]any`, `map[string]any`, `[]any`. There is no documentation for this, but the following fuzzing test did not find any failing cases after 20 minutes of continous run: ```go package main import ( "testing" "gopkg.in/yaml.v3" ) func FuzzTest(f *testing.F) { f.Fuzz(func(t *testing.T, data []byte){ var b any err := yaml.Unmarshal([]byte(data), &b) if err != nil { return } switch b.(type) { case string, nil, int, uint64, float64, map[any]any, map[string]any, []any: return default: t.Errorf("Unexpected type %T", b) } }) } ```
--- ...-string-representation-for-everything.yaml | 26 +++++++++++++++++++ confmap/expand_test.go | 16 ------------ confmap/internal/e2e/types_test.go | 10 +++++++ confmap/provider.go | 2 +- 4 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 .chloggen/mx-psi_add-string-representation-for-everything.yaml diff --git a/.chloggen/mx-psi_add-string-representation-for-everything.yaml b/.chloggen/mx-psi_add-string-representation-for-everything.yaml new file mode 100644 index 00000000000..8abc371f6fc --- /dev/null +++ b/.chloggen/mx-psi_add-string-representation-for-everything.yaml @@ -0,0 +1,26 @@ +# 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: confmap + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow using any YAML structure as a string when loading configuration. + +# One or more tracking issues or pull requests related to the change +issues: [10800] + +# (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: | + Previous to this change, slices could not be used as strings in configuration. + +# 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/confmap/expand_test.go b/confmap/expand_test.go index 5b87d747543..211b1254d5b 100644 --- a/confmap/expand_test.go +++ b/confmap/expand_test.go @@ -542,22 +542,6 @@ func TestResolverExpandUnsupportedScheme(t *testing.T) { assert.EqualError(t, err, `scheme "unsupported" is not supported for uri "unsupported:VALUE"`) } -func TestResolverExpandStringValueInvalidReturnValue(t *testing.T) { - provider := newFakeProvider("input", func(context.Context, string, WatcherFunc) (*Retrieved, error) { - return NewRetrievedFromYAML([]byte(`test: "localhost:${test:PORT}"`)) - }) - - testProvider := newFakeProvider("test", func(context.Context, string, WatcherFunc) (*Retrieved, error) { - return NewRetrievedFromYAML([]byte("[1243]")) - }) - - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) - require.NoError(t, err) - - _, err = resolver.Resolve(context.Background()) - assert.EqualError(t, err, `expanding ${test:PORT}: retrieved value does not have unambiguous string representation: [1243]`) -} - func TestResolverDefaultProviderExpand(t *testing.T) { provider := newFakeProvider("input", func(context.Context, string, WatcherFunc) (*Retrieved, error) { return NewRetrieved(map[string]any{"foo": "${HOST}"}) diff --git a/confmap/internal/e2e/types_test.go b/confmap/internal/e2e/types_test.go index c96847f9c8d..be099ee9bb2 100644 --- a/confmap/internal/e2e/types_test.go +++ b/confmap/internal/e2e/types_test.go @@ -383,6 +383,16 @@ func TestStrictTypeCasting(t *testing.T) { targetField: TargetFieldSlice, expected: []any{"filelog", "windowseventlog/application"}, }, + { + value: `[filelog,windowseventlog/application]`, + targetField: TargetFieldString, + expected: "[filelog,windowseventlog/application]", + }, + { + value: `[filelog,windowseventlog/application]`, + targetField: TargetFieldInlineString, + expected: "inline field with [filelog,windowseventlog/application] expansion", + }, } previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() diff --git a/confmap/provider.go b/confmap/provider.go index b78221d34ae..e1c1973988d 100644 --- a/confmap/provider.go +++ b/confmap/provider.go @@ -152,7 +152,7 @@ func NewRetrievedFromYAML(yamlBytes []byte, opts ...RetrievedOption) (*Retrieved val = string(yamlBytes) } return NewRetrieved(val, append(opts, withStringRepresentation(val))...) - case int, int32, int64, float32, float64, bool, map[string]any: + default: opts = append(opts, withStringRepresentation(string(yamlBytes))) }