diff --git a/.chloggen/gitprovider-rename.yaml b/.chloggen/gitprovider-rename.yaml new file mode 100644 index 000000000000..fc6089508bb8 --- /dev/null +++ b/.chloggen/gitprovider-rename.yaml @@ -0,0 +1,30 @@ +# 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. filelogreceiver) +component: gitproviderreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: The Git Provider Receiver has been renamed to GitHub Receiver. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34731] + +# (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 rename was to better match the OpenTelemetry semantic convention changes in v1.27.0 + and allows for Traces and Log signals to be added to this component. Traces + as mentioned in issue #27460 will be added in a future release to this component. + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 380273bec0bb..b2b2cc1b9da0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -236,7 +236,7 @@ receiver/filelogreceiver/ @open-teleme receiver/filestatsreceiver/ @open-telemetry/collector-contrib-approvers @atoulme receiver/flinkmetricsreceiver/ @open-telemetry/collector-contrib-approvers @JonathanWamsley @djaglowski receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax -receiver/gitproviderreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @andrzej-stencel @crobert-1 +receiver/githubreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @andrzej-stencel @crobert-1 receiver/googlecloudmonitoringreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @TylerHelmuth @abhishek-at-cloudwerx receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel receiver/haproxyreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @MovieStoreGuy diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index fc3b4f7050b2..5374e66a9a89 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -230,7 +230,7 @@ body: - receiver/filestats - receiver/flinkmetrics - receiver/fluentforward - - receiver/gitprovider + - receiver/github - receiver/googlecloudmonitoring - receiver/googlecloudpubsub - receiver/googlecloudspanner diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index edcf3c575365..cbaad5acb6ee 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -224,7 +224,7 @@ body: - receiver/filestats - receiver/flinkmetrics - receiver/fluentforward - - receiver/gitprovider + - receiver/github - receiver/googlecloudmonitoring - receiver/googlecloudpubsub - receiver/googlecloudspanner diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 778e0145fee3..2bb37ab37089 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -224,7 +224,7 @@ body: - receiver/filestats - receiver/flinkmetrics - receiver/fluentforward - - receiver/gitprovider + - receiver/github - receiver/googlecloudmonitoring - receiver/googlecloudpubsub - receiver/googlecloudspanner diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 3206e33a3637..55b55fd1b45c 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -229,7 +229,7 @@ body: - receiver/filestats - receiver/flinkmetrics - receiver/fluentforward - - receiver/gitprovider + - receiver/github - receiver/googlecloudmonitoring - receiver/googlecloudpubsub - receiver/googlecloudspanner diff --git a/receiver/gitproviderreceiver/Makefile b/receiver/githubreceiver/Makefile similarity index 100% rename from receiver/gitproviderreceiver/Makefile rename to receiver/githubreceiver/Makefile diff --git a/receiver/gitproviderreceiver/README.md b/receiver/githubreceiver/README.md similarity index 55% rename from receiver/gitproviderreceiver/README.md rename to receiver/githubreceiver/README.md index ff8d496ab5bc..aa5733fe6dbf 100644 --- a/receiver/gitproviderreceiver/README.md +++ b/receiver/githubreceiver/README.md @@ -1,23 +1,26 @@ -# Git Provider Receiver +# GitHub Receiver | Status | | | ------------- |-----------| | Stability | [development]: metrics | | Distributions | [] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fgitprovider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fgitprovider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fgitprovider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fgitprovider) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fgithub%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fgithub) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fgithub%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fgithub) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@adrielp](https://www.github.com/adrielp), [@andrzej-stencel](https://www.github.com/andrzej-stencel), [@crobert-1](https://www.github.com/crobert-1) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development -The Git Provider receiver scrapes data from Version Control Systems (VCS) that use Git as their underlying technology. +The GitHub receiver receives data from [GitHub](https://github.com). As a +starting point it scrapes metrics from repositories but will be extended to +include traces and logs. -As a starting point, this receiver can infer many of the same core VCS metrics across vendors, while being able to receive additional data specific to vendors. +The current default set of metrics can be found in +[documentation.md](./documentation.md). -The current default set of metrics common across all vendors can be found in [documentation.md](./documentation.md). - -These VCS metrics can be used as leading indicators ([capabilities][doracap]) to the [DORA][dorafour] metrics; helping provide insight into modern-day engineering practices. +These metrics can be used as leading indicators ([capabilities][doracap]) +to the [DORA][dorafour] metrics; helping provide insight into modern-day +engineering practices. [doracap]: https://dora.dev/capabilities/ [dorafour]: https://dora.dev/guides/dora-metrics-four-keys/ @@ -31,7 +34,7 @@ The collection interval is common to all scrapers and is set to 30 seconds by de > and organizations. You may run into significantly more rate limiting. ```yaml -gitprovider: +github: collection_interval: #default = 30s recommended 300s scrapers: : @@ -47,7 +50,7 @@ extensions: token: ${env:GH_PAT} receivers: - gitprovider: + github: initial_delay: 1s collection_interval: 60s scrapers: @@ -64,23 +67,16 @@ service: extensions: [bearertokenauth/github] pipelines: metrics: - receivers: [..., gitprovider] + receivers: [..., github] processors: [] exporters: [...] ``` -This receiver is developed upstream in the [liatrio-otel-collector distribution](https://github.com/liatrio/liatrio-otel-collector) -where a quick start exists with an [example config](https://github.com/liatrio/liatrio-otel-collector/blob/main/config/config.yaml) - -A Grafana Dashboard exists on the marketplace for this receiver and can be -found [here](https://grafana.com/grafana/dashboards/20976-engineering-effectiveness-metrics/). +A Grafana Dashboard exists on the marketplace for metrics from this receiver +and can be found +[here](https://grafana.com/grafana/dashboards/20976-engineering-effectiveness-metrics/). -The available scrapers are: -| Scraper | Description | -|----------|-------------------------| -| [github] | VCS Metrics from [GitHub](https://github.com/) | - -## GitHub Scraper +## Scraping > Important: > * The GitHub scraper does not emit metrics for branches that have not had @@ -89,7 +85,9 @@ The available scrapers are: > change when rebases occur, recreating the commits with new timestamps. + + For additional context on GitHub scraper limitations and inner workings please -see the [GitHub Scraper README][ghsread]. +see the [Scraping README][ghsread]. -[ghsread]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md#github-limitations +[ghsread]: internal/scraper/githubscraper/README.md#github-limitations diff --git a/receiver/gitproviderreceiver/config.go b/receiver/githubreceiver/config.go similarity index 90% rename from receiver/gitproviderreceiver/config.go rename to receiver/githubreceiver/config.go index af62305613ca..f29dc7c0a429 100644 --- a/receiver/gitproviderreceiver/config.go +++ b/receiver/githubreceiver/config.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package gitproviderreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver" +package githubreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver" import ( "errors" @@ -11,8 +11,8 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) const ( diff --git a/receiver/gitproviderreceiver/config_test.go b/receiver/githubreceiver/config_test.go similarity index 94% rename from receiver/gitproviderreceiver/config_test.go rename to receiver/githubreceiver/config_test.go index 84d9b22d8869..26b0d9519891 100644 --- a/receiver/gitproviderreceiver/config_test.go +++ b/receiver/githubreceiver/config_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package gitproviderreceiver +package githubreceiver import ( "path/filepath" @@ -15,9 +15,9 @@ import ( "go.opentelemetry.io/collector/otelcol/otelcoltest" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" ) func TestLoadConfig(t *testing.T) { @@ -80,7 +80,7 @@ func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { // nolint:staticcheck _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-invalidscraperkey.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"gitprovider\": invalid scraper key: \"invalidscraperkey\"") + require.Contains(t, err.Error(), "error reading configuration for \"github\": invalid scraper key: \"invalidscraperkey\"") } func TestConfig_Unmarshal(t *testing.T) { diff --git a/receiver/githubreceiver/doc.go b/receiver/githubreceiver/doc.go new file mode 100644 index 000000000000..8fda1b4c362d --- /dev/null +++ b/receiver/githubreceiver/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package githubreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver" diff --git a/receiver/gitproviderreceiver/documentation.md b/receiver/githubreceiver/documentation.md similarity index 99% rename from receiver/gitproviderreceiver/documentation.md rename to receiver/githubreceiver/documentation.md index 41be3be166c2..a95f684a1fd7 100644 --- a/receiver/gitproviderreceiver/documentation.md +++ b/receiver/githubreceiver/documentation.md @@ -1,6 +1,6 @@ [comment]: <> (Code generated by mdatagen. DO NOT EDIT.) -# gitprovider +# github ## Default Metrics diff --git a/receiver/gitproviderreceiver/factory.go b/receiver/githubreceiver/factory.go similarity index 83% rename from receiver/gitproviderreceiver/factory.go rename to receiver/githubreceiver/factory.go index 6e3f413ed99e..3548d970d890 100644 --- a/receiver/gitproviderreceiver/factory.go +++ b/receiver/githubreceiver/factory.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package gitproviderreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver" +package githubreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver" import ( "context" @@ -13,22 +13,22 @@ import ( "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" ) -// This file implements a factory for the git provider receiver +// This file implements a factory for the github receiver var ( scraperFactories = map[string]internal.ScraperFactory{ githubscraper.TypeStr: &githubscraper.Factory{}, } - errConfigNotValid = errors.New("configuration is not valid for the git provider receiver") + errConfigNotValid = errors.New("configuration is not valid for the github receiver") ) -// NewFactory creates a factory for the git provider receiver +// NewFactory creates a factory for the github receiver func NewFactory() receiver.Factory { return receiver.NewFactory( metadata.Type, @@ -52,7 +52,7 @@ func createDefaultConfig() component.Config { ControllerConfig: scraperhelper.NewDefaultControllerConfig(), // TODO: metrics builder configuration may need to be in each sub scraper, // TODO: for right now setting here because the metrics in this receiver will apply to all - // TODO: scrapers defined as a common set of gitprovider + // TODO: scrapers defined as a common set of github // TODO: aqp completely remove these comments if the metrics build config // needs to be defined in each scraper // MetricsBuilderConfig: metadata.DefaultMetricsBuilderConfig(), @@ -96,19 +96,19 @@ func createAddScraperOpts( scraperControllerOptions := make([]scraperhelper.ScraperControllerOption, 0, len(cfg.Scrapers)) for key, cfg := range cfg.Scrapers { - gitProviderScraper, err := createGitProviderScraper(ctx, params, key, cfg, factories) + githubScraper, err := createGitHubScraper(ctx, params, key, cfg, factories) if err != nil { return nil, fmt.Errorf("failed to create scraper %q: %w", key, err) } - scraperControllerOptions = append(scraperControllerOptions, scraperhelper.AddScraper(gitProviderScraper)) + scraperControllerOptions = append(scraperControllerOptions, scraperhelper.AddScraper(githubScraper)) } return scraperControllerOptions, nil } -func createGitProviderScraper( +func createGitHubScraper( ctx context.Context, params receiver.Settings, key string, diff --git a/receiver/gitproviderreceiver/factory_test.go b/receiver/githubreceiver/factory_test.go similarity index 96% rename from receiver/gitproviderreceiver/factory_test.go rename to receiver/githubreceiver/factory_test.go index d4364fad0285..f55c55719cc3 100644 --- a/receiver/gitproviderreceiver/factory_test.go +++ b/receiver/githubreceiver/factory_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package gitproviderreceiver +package githubreceiver import ( "context" @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/receiver/receivertest" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" ) var creationSet = receivertest.NewNopSettings() diff --git a/receiver/gitproviderreceiver/generated_component_test.go b/receiver/githubreceiver/generated_component_test.go similarity index 96% rename from receiver/gitproviderreceiver/generated_component_test.go rename to receiver/githubreceiver/generated_component_test.go index a94aef51c091..165e7d443d00 100644 --- a/receiver/gitproviderreceiver/generated_component_test.go +++ b/receiver/githubreceiver/generated_component_test.go @@ -1,6 +1,6 @@ // Code generated by mdatagen. DO NOT EDIT. -package gitproviderreceiver +package githubreceiver import ( "context" @@ -16,7 +16,7 @@ import ( ) func TestComponentFactoryType(t *testing.T) { - require.Equal(t, "gitprovider", NewFactory().Type().String()) + require.Equal(t, "github", NewFactory().Type().String()) } func TestComponentConfigStruct(t *testing.T) { diff --git a/receiver/gitproviderreceiver/generated_package_test.go b/receiver/githubreceiver/generated_package_test.go similarity index 84% rename from receiver/gitproviderreceiver/generated_package_test.go rename to receiver/githubreceiver/generated_package_test.go index cd26ecd1c6e0..08b03a769078 100644 --- a/receiver/gitproviderreceiver/generated_package_test.go +++ b/receiver/githubreceiver/generated_package_test.go @@ -1,6 +1,6 @@ // Code generated by mdatagen. DO NOT EDIT. -package gitproviderreceiver +package githubreceiver import ( "testing" diff --git a/receiver/gitproviderreceiver/go.mod b/receiver/githubreceiver/go.mod similarity index 96% rename from receiver/gitproviderreceiver/go.mod rename to receiver/githubreceiver/go.mod index edd9e55ef687..7b31b972fe6e 100644 --- a/receiver/gitproviderreceiver/go.mod +++ b/receiver/githubreceiver/go.mod @@ -1,4 +1,4 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver go 1.22.0 @@ -95,9 +95,9 @@ require ( go.opentelemetry.io/collector/processor v0.108.1 // indirect go.opentelemetry.io/collector/service v0.108.1 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel v1.29.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 @@ -108,11 +108,11 @@ require ( go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 // indirect go.opentelemetry.io/otel/log v0.4.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.opentelemetry.io/otel/sdk/log v0.4.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect @@ -121,7 +121,7 @@ require ( golang.org/x/text v0.17.0 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c // 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 diff --git a/receiver/gitproviderreceiver/go.sum b/receiver/githubreceiver/go.sum similarity index 96% rename from receiver/gitproviderreceiver/go.sum rename to receiver/githubreceiver/go.sum index 0fccc8ef8738..334af7972f00 100644 --- a/receiver/gitproviderreceiver/go.sum +++ b/receiver/githubreceiver/go.sum @@ -198,14 +198,14 @@ go.opentelemetry.io/collector/service v0.108.1 h1:Ov0qP5JiX0DHaCrZY0jHnpqc8MVHwS go.opentelemetry.io/collector/service v0.108.1/go.mod h1:mbZXlO5gT99nXNGbDOG6peqPd6og5Tm49P4FP0oi56U= 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= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV/XcKYxJkw= 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 v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= 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= @@ -226,16 +226,16 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bE go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= go.opentelemetry.io/otel/log v0.4.0 h1:/vZ+3Utqh18e8TPjuc3ecg284078KWrR8BRz+PQAj3o= go.opentelemetry.io/otel/log v0.4.0/go.mod h1:DhGnQvky7pHy82MIRV43iXh3FlKN8UUKftn0KbLOq6I= -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/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= 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/log v0.4.0 h1:1mMI22L82zLqf6KtkjrRy5BbagOTWdJsqMY/HSqILAA= go.opentelemetry.io/otel/sdk/log v0.4.0/go.mod h1:AYJ9FVF0hNOgAVzUG/ybg/QttnXhUePWAupmCqtdESo= 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.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -284,8 +284,8 @@ gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= 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-20240808171019-573a1156607a h1:EKiZZXueP9/T68B8Nl0GAx9cjbQnCId0yP3qPMgaaHs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c h1:Kqjm4WpoWvwhMPcrAczoTyMySQmYa9Wy2iL6Con4zn8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= 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= diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_config.go b/receiver/githubreceiver/internal/metadata/generated_config.go similarity index 95% rename from receiver/gitproviderreceiver/internal/metadata/generated_config.go rename to receiver/githubreceiver/internal/metadata/generated_config.go index 40c0dc6f6961..d16a2a6316c2 100644 --- a/receiver/gitproviderreceiver/internal/metadata/generated_config.go +++ b/receiver/githubreceiver/internal/metadata/generated_config.go @@ -26,7 +26,7 @@ func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { return nil } -// MetricsConfig provides config for gitprovider metrics. +// MetricsConfig provides config for github metrics. type MetricsConfig struct { VcsRepositoryChangeCount MetricConfig `mapstructure:"vcs.repository.change.count"` VcsRepositoryChangeTimeOpen MetricConfig `mapstructure:"vcs.repository.change.time_open"` @@ -109,7 +109,7 @@ func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { return nil } -// ResourceAttributesConfig provides config for gitprovider resource attributes. +// ResourceAttributesConfig provides config for github resource attributes. type ResourceAttributesConfig struct { OrganizationName ResourceAttributeConfig `mapstructure:"organization.name"` VcsVendorName ResourceAttributeConfig `mapstructure:"vcs.vendor.name"` @@ -126,7 +126,7 @@ func DefaultResourceAttributesConfig() ResourceAttributesConfig { } } -// MetricsBuilderConfig is a configuration for gitprovider metrics builder. +// MetricsBuilderConfig is a configuration for github metrics builder. type MetricsBuilderConfig struct { Metrics MetricsConfig `mapstructure:"metrics"` ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_config_test.go b/receiver/githubreceiver/internal/metadata/generated_config_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/generated_config_test.go rename to receiver/githubreceiver/internal/metadata/generated_config_test.go diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_metrics.go b/receiver/githubreceiver/internal/metadata/generated_metrics.go similarity index 99% rename from receiver/gitproviderreceiver/internal/metadata/generated_metrics.go rename to receiver/githubreceiver/internal/metadata/generated_metrics.go index f49509ba486c..36d318f5d891 100644 --- a/receiver/gitproviderreceiver/internal/metadata/generated_metrics.go +++ b/receiver/githubreceiver/internal/metadata/generated_metrics.go @@ -10,7 +10,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/receiver" - conventions "go.opentelemetry.io/collector/semconv/v1.25.0" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" ) // AttributeChangeState specifies the a value change.state attribute. @@ -816,7 +816,7 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() rm.SetSchemaUrl(conventions.SchemaURL) ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver") + ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricVcsRepositoryChangeCount.emit(ils.Metrics()) diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_metrics_test.go b/receiver/githubreceiver/internal/metadata/generated_metrics_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/generated_metrics_test.go rename to receiver/githubreceiver/internal/metadata/generated_metrics_test.go diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_resource.go b/receiver/githubreceiver/internal/metadata/generated_resource.go similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/generated_resource.go rename to receiver/githubreceiver/internal/metadata/generated_resource.go diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_resource_test.go b/receiver/githubreceiver/internal/metadata/generated_resource_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/generated_resource_test.go rename to receiver/githubreceiver/internal/metadata/generated_resource_test.go diff --git a/receiver/gitproviderreceiver/internal/metadata/generated_status.go b/receiver/githubreceiver/internal/metadata/generated_status.go similarity index 74% rename from receiver/gitproviderreceiver/internal/metadata/generated_status.go rename to receiver/githubreceiver/internal/metadata/generated_status.go index 55c1b29cd98d..93a0053693c1 100644 --- a/receiver/gitproviderreceiver/internal/metadata/generated_status.go +++ b/receiver/githubreceiver/internal/metadata/generated_status.go @@ -7,8 +7,8 @@ import ( ) var ( - Type = component.MustNewType("gitprovider") - ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver" + Type = component.MustNewType("github") + ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver" ) const ( diff --git a/receiver/gitproviderreceiver/internal/metadata/package_test.go b/receiver/githubreceiver/internal/metadata/package_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/package_test.go rename to receiver/githubreceiver/internal/metadata/package_test.go diff --git a/receiver/gitproviderreceiver/internal/metadata/testdata/config.yaml b/receiver/githubreceiver/internal/metadata/testdata/config.yaml similarity index 100% rename from receiver/gitproviderreceiver/internal/metadata/testdata/config.yaml rename to receiver/githubreceiver/internal/metadata/testdata/config.yaml diff --git a/receiver/gitproviderreceiver/internal/scraper.go b/receiver/githubreceiver/internal/scraper.go similarity index 91% rename from receiver/gitproviderreceiver/internal/scraper.go rename to receiver/githubreceiver/internal/scraper.go index 1bb3bc6e4f36..e9fb4c7982f1 100644 --- a/receiver/gitproviderreceiver/internal/scraper.go +++ b/receiver/githubreceiver/internal/scraper.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" +package internal // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" import ( "context" diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md b/receiver/githubreceiver/internal/scraper/githubscraper/README.md similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md rename to receiver/githubreceiver/internal/scraper/githubscraper/README.md diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/config.go b/receiver/githubreceiver/internal/scraper/githubscraper/config.go similarity index 82% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/config.go rename to receiver/githubreceiver/internal/scraper/githubscraper/config.go index 79642ed06b1c..54b1f2e73b79 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/config.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/config.go @@ -1,13 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" +package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" import ( "go.opentelemetry.io/collector/config/confighttp" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) // Config relating to Github Metric Scraper. diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/config_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/config_test.go similarity index 94% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/config_test.go rename to receiver/githubreceiver/internal/scraper/githubscraper/config_test.go index 9f39b0bca938..268d2f347808 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/config_test.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/config/confighttp" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) // TestConfig ensures a config created with the factory is the same as one created manually with diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/factory.go b/receiver/githubreceiver/internal/scraper/githubscraper/factory.go similarity index 86% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/factory.go rename to receiver/githubreceiver/internal/scraper/githubscraper/factory.go index fef767dfe6e4..ab052b9106e6 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/factory.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/factory.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" +package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" import ( "context" @@ -11,11 +11,11 @@ import ( "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) -// This file implements factory for the GitHub Scraper as part of the Git Provider Receiver +// This file implements factory for the GitHub Scraper as part of the GitHub Receiver const ( // TypeStr is the value of "type" key in configuration. diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/factory_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/factory_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/factory_test.go rename to receiver/githubreceiver/internal/scraper/githubscraper/factory_test.go diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/generated_graphql.go b/receiver/githubreceiver/internal/scraper/githubscraper/generated_graphql.go similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/generated_graphql.go rename to receiver/githubreceiver/internal/scraper/githubscraper/generated_graphql.go diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/genqlient.graphql b/receiver/githubreceiver/internal/scraper/githubscraper/genqlient.graphql similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/genqlient.graphql rename to receiver/githubreceiver/internal/scraper/githubscraper/genqlient.graphql diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/genqlient.yaml b/receiver/githubreceiver/internal/scraper/githubscraper/genqlient.yaml similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/genqlient.yaml rename to receiver/githubreceiver/internal/scraper/githubscraper/genqlient.yaml diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper.go b/receiver/githubreceiver/internal/scraper/githubscraper/github_scraper.go similarity index 95% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper.go rename to receiver/githubreceiver/internal/scraper/githubscraper/github_scraper.go index a3ebeb9f13b3..95e24bc9be47 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/github_scraper.go @@ -3,7 +3,7 @@ //go:generate ../../../../../.tools/genqlient -package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" +package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" import ( "context" @@ -18,7 +18,7 @@ import ( "go.opentelemetry.io/collector/receiver" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) var errClientNotInitErr = errors.New("http client not initialized") @@ -126,7 +126,7 @@ func (ghs *githubScraper) scrape(ctx context.Context) (pmetric.Metrics, error) { // Iterate through the refs (branches) populating the Branch focused // metrics for _, branch := range branches { - // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md#github-limitations + // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/githubreceiver/internal/scraper/githubscraper/README.md#github-limitations // for more information as to why we do not emit metrics for // the default branch (trunk) nor any branch with no changes to // it. @@ -134,7 +134,7 @@ func (ghs *githubScraper) scrape(ctx context.Context) (pmetric.Metrics, error) { continue } - // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md#github-limitations + // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/githubreceiver/internal/scraper/githubscraper/README.md#github-limitations // for more information as to why `BehindBy` and `AheadBy` are // swapped. ghs.mb.RecordVcsRepositoryRefRevisionsAheadDataPoint(now, int64(branch.Compare.BehindBy), branch.Repository.Name, branch.Name, refType) diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/github_scraper_test.go similarity index 98% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper_test.go rename to receiver/githubreceiver/internal/scraper/githubscraper/github_scraper_test.go index 39026456a02b..e5def344c713 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/github_scraper_test.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/github_scraper_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver" +package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver" import ( "context" @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" - "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata" ) func TestNewGitHubScraper(t *testing.T) { diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers.go b/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go similarity index 98% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers.go rename to receiver/githubreceiver/internal/scraper/githubscraper/helpers.go index b01554922cb7..e88a26f6bab0 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver/internal/scraper/githubscraper" +package githubscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/scraper/githubscraper" import ( "context" @@ -221,7 +221,7 @@ func (ghs *githubScraper) evalCommits( var cursor *string items := defaultReturnItems - // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md#github-limitations + // See https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/githubreceiver/internal/scraper/githubscraper/README.md#github-limitations // for more information as to why `BehindBy` and `AheadBy` are // swapped. pages := getNumPages(float64(defaultReturnItems), float64(branch.Compare.BehindBy)) diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go rename to receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/package_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/package_test.go similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/package_test.go rename to receiver/githubreceiver/internal/scraper/githubscraper/package_test.go diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/schema.graphql b/receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql similarity index 100% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/schema.graphql rename to receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml b/receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml similarity index 98% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml rename to receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml index 3c8f54923602..45cc52ce905d 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml +++ b/receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_happy_path.yaml @@ -7,7 +7,7 @@ resourceMetrics: - key: vcs.vendor.name value: stringValue: github - schemaUrl: https://opentelemetry.io/schemas/1.25.0 + schemaUrl: https://opentelemetry.io/schemas/1.27.0 scopeMetrics: - metrics: - description: The number of changes (pull requests) in a repository, categorized by their state (either open or merged). @@ -179,5 +179,5 @@ resourceMetrics: name: vcs.repository.ref.time unit: s scope: - name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver version: latest diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml b/receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml similarity index 87% rename from receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml rename to receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml index e7e817b23b45..48efcfa7b2be 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml +++ b/receiver/githubreceiver/internal/scraper/githubscraper/testdata/scraper/expected_no_repos.yaml @@ -7,7 +7,7 @@ resourceMetrics: - key: vcs.vendor.name value: stringValue: github - schemaUrl: https://opentelemetry.io/schemas/1.25.0 + schemaUrl: https://opentelemetry.io/schemas/1.27.0 scopeMetrics: - metrics: - description: The number of repositories in an organization. @@ -19,5 +19,5 @@ resourceMetrics: name: vcs.repository.count unit: '{repository}' scope: - name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver version: latest diff --git a/receiver/gitproviderreceiver/metadata.yaml b/receiver/githubreceiver/metadata.yaml similarity index 98% rename from receiver/gitproviderreceiver/metadata.yaml rename to receiver/githubreceiver/metadata.yaml index a7c6cb72b2e7..1a74ec879c70 100644 --- a/receiver/gitproviderreceiver/metadata.yaml +++ b/receiver/githubreceiver/metadata.yaml @@ -1,6 +1,6 @@ -type: gitprovider +type: github -sem_conv_version: 1.25.0 +sem_conv_version: 1.27.0 status: class: receiver diff --git a/receiver/gitproviderreceiver/testdata/config-invalidscraperkey.yaml b/receiver/githubreceiver/testdata/config-invalidscraperkey.yaml similarity index 83% rename from receiver/gitproviderreceiver/testdata/config-invalidscraperkey.yaml rename to receiver/githubreceiver/testdata/config-invalidscraperkey.yaml index 077ccef6b2c0..1123b6fc6fae 100644 --- a/receiver/gitproviderreceiver/testdata/config-invalidscraperkey.yaml +++ b/receiver/githubreceiver/testdata/config-invalidscraperkey.yaml @@ -1,6 +1,6 @@ --- receivers: - gitprovider: + github: initial_delay: 1s collection_interval: 60s scrapers: @@ -15,6 +15,6 @@ exporters: service: pipelines: metrics: - receivers: [gitprovider] + receivers: [github] processors: [nop] exporters: [nop] diff --git a/receiver/gitproviderreceiver/testdata/config-noscrapers.yaml b/receiver/githubreceiver/testdata/config-noscrapers.yaml similarity index 74% rename from receiver/gitproviderreceiver/testdata/config-noscrapers.yaml rename to receiver/githubreceiver/testdata/config-noscrapers.yaml index 0797fbcb4e67..31584351f7ec 100644 --- a/receiver/gitproviderreceiver/testdata/config-noscrapers.yaml +++ b/receiver/githubreceiver/testdata/config-noscrapers.yaml @@ -1,5 +1,5 @@ receivers: - gitprovider: + github: processors: nop: @@ -10,7 +10,7 @@ exporters: service: pipelines: metrics: - receivers: [gitprovider] + receivers: [github] processors: [nop] exporters: [nop] diff --git a/receiver/gitproviderreceiver/testdata/config.yaml b/receiver/githubreceiver/testdata/config.yaml similarity index 75% rename from receiver/gitproviderreceiver/testdata/config.yaml rename to receiver/githubreceiver/testdata/config.yaml index d656e007d27d..1ad44d38d604 100644 --- a/receiver/gitproviderreceiver/testdata/config.yaml +++ b/receiver/githubreceiver/testdata/config.yaml @@ -1,11 +1,11 @@ receivers: - gitprovider: + github: initial_delay: 1s collection_interval: 60s scrapers: github: - gitprovider/customname: + github/customname: initial_delay: 1s collection_interval: 30s scrapers: @@ -20,7 +20,7 @@ exporters: service: pipelines: metrics: - receivers: [gitprovider, gitprovider/customname] + receivers: [github, github/customname] processors: [nop] exporters: [nop] diff --git a/receiver/gitproviderreceiver/doc.go b/receiver/gitproviderreceiver/doc.go deleted file mode 100644 index 5931a522607b..000000000000 --- a/receiver/gitproviderreceiver/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -package gitproviderreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver" diff --git a/versions.yaml b/versions.yaml index 738f51eacb57..a226f65cb3a0 100644 --- a/versions.yaml +++ b/versions.yaml @@ -213,7 +213,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver - - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/gitproviderreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudmonitoringreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver