From e6f10a600942b54ef17a054a53dc7fde06418829 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Wed, 29 Mar 2023 11:43:31 -0700 Subject: [PATCH] [chore] add generated status to oauth2clientauthextension (#20329) --- extension/oauth2clientauthextension/README.md | 15 ++++++++------- extension/oauth2clientauthextension/doc.go | 2 ++ extension/oauth2clientauthextension/factory.go | 4 +++- .../internal/metadata/generated_status.go | 9 +++++++++ extension/oauth2clientauthextension/metadata.yaml | 6 ++++++ 5 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 extension/oauth2clientauthextension/internal/metadata/generated_status.go create mode 100644 extension/oauth2clientauthextension/metadata.yaml diff --git a/extension/oauth2clientauthextension/README.md b/extension/oauth2clientauthextension/README.md index cb79a402fec2..9b2f887ff5e9 100644 --- a/extension/oauth2clientauthextension/README.md +++ b/extension/oauth2clientauthextension/README.md @@ -1,9 +1,13 @@ # Authenticator - OAuth2 Client Credentials + +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Distributions | [contrib] | -| Status | | -| ------------------------ |-----------------------| -| Stability | [beta] | -| Distributions | [contrib] | +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + This extension provides OAuth2 Client Credentials flow authenticator for HTTP and gRPC based exporters. The extension @@ -72,6 +76,3 @@ Following are the configuration fields This is optional and not setting this configuration implies there is no timeout on the client. For more information on client side TLS settings, see [configtls README](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configtls). - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/extension/oauth2clientauthextension/doc.go b/extension/oauth2clientauthextension/doc.go index a26df16889ab..1cb5774b881d 100644 --- a/extension/oauth2clientauthextension/doc.go +++ b/extension/oauth2clientauthextension/doc.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:generate mdatagen metadata.yaml + // Package oauth2clientauthextension implements `cauth.Client` // This extension provides OAuth2 Client Credentials flow authenticator for HTTP and gRPC based exporters. // The extension fetches and refreshes the token after expiry diff --git a/extension/oauth2clientauthextension/factory.go b/extension/oauth2clientauthextension/factory.go index 0eabc297976a..3a049ad522dc 100644 --- a/extension/oauth2clientauthextension/factory.go +++ b/extension/oauth2clientauthextension/factory.go @@ -20,6 +20,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" "go.opentelemetry.io/collector/extension/auth" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension/internal/metadata" ) const ( @@ -33,7 +35,7 @@ func NewFactory() extension.Factory { typeStr, createDefaultConfig, createExtension, - component.StabilityLevelBeta, + metadata.Stability, ) } diff --git a/extension/oauth2clientauthextension/internal/metadata/generated_status.go b/extension/oauth2clientauthextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..c53c077163cc --- /dev/null +++ b/extension/oauth2clientauthextension/internal/metadata/generated_status.go @@ -0,0 +1,9 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +const Stability = component.StabilityLevelBeta diff --git a/extension/oauth2clientauthextension/metadata.yaml b/extension/oauth2clientauthextension/metadata.yaml new file mode 100644 index 000000000000..bc3534784fe8 --- /dev/null +++ b/extension/oauth2clientauthextension/metadata.yaml @@ -0,0 +1,6 @@ +name: oauth2clientauthextension + +status: + type: extension + stability: beta + distributions: [contrib] \ No newline at end of file