Skip to content

PMM-12548 Slowlog as new MongoDB query source. #3776

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

Draft
wants to merge 35 commits into
base: v3
Choose a base branch
from

Conversation

JiriCtvrtka
Copy link
Contributor

PMM-12548

Link to the Feature Build: SUBMODULES-0

@JiriCtvrtka JiriCtvrtka changed the title PMM-12548 Slowlog as new MongoDB query source PMM-12548 Slowlog as new MongoDB query source. Mar 13, 2025
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 2.55102% with 191 lines in your changes missing coverage. Please review.

Project coverage is 43.49%. Comparing base (d90db6c) to head (5e80b7a).

Files with missing lines Patch % Lines
managed/services/inventory/agents.go 0.00% 68 Missing ⚠️
.../inventory/add_agent_qan_mongodb_mongolog_agent.go 0.00% 43 Missing ⚠️
managed/services/management/mongodb.go 0.00% 23 Missing ⚠️
managed/services/converters.go 0.00% 16 Missing ⚠️
managed/services/agents/mongodb.go 0.00% 14 Missing ⚠️
admin/commands/list.go 0.00% 9 Missing and 1 partial ⚠️
managed/services/inventory/grpc/agents_server.go 0.00% 8 Missing ⚠️
admin/cmd/bootstrap.go 0.00% 5 Missing ⚠️
managed/services/agents/state.go 0.00% 2 Missing ⚠️
admin/commands/management/add_mongodb.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #3776      +/-   ##
==========================================
- Coverage   43.67%   43.49%   -0.18%     
==========================================
  Files         369      370       +1     
  Lines       45189    45372     +183     
==========================================
- Hits        19737    19736       -1     
- Misses      23744    23927     +183     
- Partials     1708     1709       +1     
Flag Coverage Δ
admin 11.31% <0.00%> (-0.14%) ⬇️
managed 44.88% <3.64%> (-0.20%) ⬇️
vmproxy 73.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
@percona percona deleted a comment from percona-robot Apr 28, 2025
},
},
)
database.Collection("secondcollection").Aggregate(ctx, mongo.Pipeline{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Error return value of (*go.mongodb.org/mongo-driver/mongo.Collection).Aggregate is not checked (errcheck)

return fp, nil
}

// Helper for insert operations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)

return fp, nil
}

// Helper for update operations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)

return fp, nil
}

// Helper for delete operations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)

// See the License for the specific language governing permissions and
// limitations under the License.

package report

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
package-comments: should have a package comment (revive)

}

// Start starts analyzer but doesn't wait until it exits
func (l *mongolog) Start() error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ST1016: methods on the same type should have the same receiver name (seen 1x "l", 1x "s") (stylecheck)


result := aggregator.createResult(ctx)

require.Equal(t, 1, len(result.Buckets))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
len: use require.Len (testifylint)

assert.Equal(t, expected.StartTs, actual.StartTs)
assert.Equal(t, expected.EndTs, actual.EndTs)
assert.Len(t, actual.Buckets, 1)
assert.EqualValues(t, actual.Buckets[0].Common.NumQueries, 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
float-compare: use assert.InEpsilon (or InDelta) (testifylint)

ctr.Stop()
}

func countLinesInFile(t *testing.T, filePath string) int {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
test helper function should start from t.Helper() (thelper)


// AddAgentQANMongoDBMongologAgentCommand is used by Kong for CLI flags and commands.
//
//nolint:lll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:lll is unused for linter "lll" (nolintlint)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants