Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to OTel Collector v0.116.0 #239

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
341 changes: 175 additions & 166 deletions go.mod

Large diffs are not rendered by default.

738 changes: 376 additions & 362 deletions go.sum

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions receiver/mongodbreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.opentelemetry.io/collector/scraper"

"github.com/GoogleCloudPlatform/opentelemetry-operations-collector/receiver/mongodbreceiver/internal/metadata"
)
Expand Down Expand Up @@ -62,15 +63,15 @@ func createMetricsReceiver(
cfg := rConf.(*Config)
ms := newMongodbScraper(params, cfg)

scraper, err := scraperhelper.NewScraper(metadata.Type, ms.scrape,
scraperhelper.WithStart(ms.start),
scraperhelper.WithShutdown(ms.shutdown))
scraper, err := scraper.NewMetrics(ms.scrape,
scraper.WithStart(ms.start),
scraper.WithShutdown(ms.shutdown))
if err != nil {
return nil, err
}

return scraperhelper.NewScraperControllerReceiver(
&cfg.ControllerConfig, params, consumer,
scraperhelper.AddScraper(scraper),
scraperhelper.AddScraper(metadata.Type, scraper),
)
}
2 changes: 1 addition & 1 deletion receiver/mongodbreceiver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/hashicorp/go-version"
"go.mongodb.org/mongo-driver/bson"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/receiver/scrapererror"
"go.opentelemetry.io/collector/scraper/scrapererror"

"github.com/GoogleCloudPlatform/opentelemetry-operations-collector/receiver/mongodbreceiver/internal/metadata"
)
Expand Down
2 changes: 1 addition & 1 deletion receiver/mongodbreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scrapererror"
"go.opentelemetry.io/collector/scraper/scrapererror"
"go.uber.org/zap"

"github.com/GoogleCloudPlatform/opentelemetry-operations-collector/receiver/mongodbreceiver/internal/metadata"
Expand Down
5 changes: 3 additions & 2 deletions receiver/varnishreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.opentelemetry.io/collector/scraper"

"github.com/GoogleCloudPlatform/opentelemetry-operations-collector/receiver/varnishreceiver/internal/metadata"
)
Expand Down Expand Up @@ -50,13 +51,13 @@ func createMetricsReceiver(
) (receiver.Metrics, error) {
cfg := rConf.(*Config)
ns := newVarnishScraper(params, cfg)
scraper, err := scraperhelper.NewScraper(metadata.Type, ns.scrape, scraperhelper.WithStart(ns.start))
scraper, err := scraper.NewMetrics(ns.scrape, scraper.WithStart(ns.start))
if err != nil {
return nil, err
}

return scraperhelper.NewScraperControllerReceiver(
&cfg.ControllerConfig, params, consumer,
scraperhelper.AddScraper(scraper),
scraperhelper.AddScraper(metadata.Type, scraper),
)
}
Loading