Skip to content
Merged
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
7 changes: 7 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"github.com/hashicorp/go-version"
"github.com/hashicorp/hcl/v2"
zerolog "github.com/rs/zerolog/log"
"github.com/spf13/viper"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -1096,6 +1097,8 @@ func collectProviderVersions(providers []*config.RequiredProvider, getVersion fu
func reportFetchSummaryErrors(span trace.Span, fetchSummaries map[string]ProviderFetchSummary) {
var totalFetched, totalWarnings, totalErrors uint64

allowUnmanaged := Version == DevelopmentVersion && viper.GetBool("debug-sentry")

for _, ps := range fetchSummaries {
totalFetched += ps.TotalResourcesFetched
totalWarnings += ps.Diagnostics().Warnings()
Expand All @@ -1108,6 +1111,10 @@ func reportFetchSummaryErrors(span trace.Span, fetchSummaries map[string]Provide
)
span.SetAttributes(telemetry.MapToAttributes(ps.Metrics())...)

if ps.Version == plugin.Unmanaged && !allowUnmanaged {
continue
}

for _, e := range ps.Diagnostics().Squash() {
if rd, ok := e.(diag.Redactable); ok {
if r := rd.Redacted(); r != nil {
Expand Down