Skip to content

usage metrics: report acquisition + parsers metrics to LAPI #3709

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 23 commits into
base: master
Choose a base branch
from

Conversation

blotus
Copy link
Member

@blotus blotus commented Jun 30, 2025

Send more detailed metrics about acquisition and parsing to LAPI/CAPI to help users troubleshoot.

  • Acquisition metrics
  • Parser metrics
  • Show the metrics in cscli metrics in LAPI
  • Do not send to CAPI if LAPI is not enrolled in the console

Copy link

@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Copy link

@blotus: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@blotus blotus marked this pull request as draft June 30, 2025 13:22
@blotus
Copy link
Member Author

blotus commented Jun 30, 2025

/area agent
/kind enhancement

Copy link

codecov bot commented Jun 30, 2025

Codecov Report

Attention: Patch coverage is 59.13706% with 161 lines in your changes missing coverage. Please review.

Project coverage is 60.74%. Comparing base (822d189) to head (77d92f3).

Files with missing lines Patch % Lines
cmd/crowdsec/lpmetrics.go 84.89% 15 Missing and 6 partials ⚠️
cmd/crowdsec-cli/climetrics/store.go 5.00% 19 Missing ⚠️
pkg/acquisition/modules/cloudwatch/cloudwatch.go 6.25% 12 Missing and 3 partials ⚠️
cmd/crowdsec-cli/cliitem/metrics.go 0.00% 11 Missing ⚠️
pkg/acquisition/modules/s3/s3.go 16.66% 7 Missing and 3 partials ⚠️
pkg/metrics/metrics.go 52.38% 10 Missing ⚠️
pkg/acquisition/modules/kinesis/kinesis.go 11.11% 7 Missing and 1 partial ⚠️
pkg/acquisition/modules/syslog/syslog.go 11.11% 5 Missing and 3 partials ⚠️
pkg/acquisition/acquisition.go 41.66% 5 Missing and 2 partials ⚠️
...g/acquisition/modules/kubernetesaudit/k8s_audit.go 14.28% 4 Missing and 2 partials ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3709      +/-   ##
==========================================
+ Coverage   60.67%   60.74%   +0.06%     
==========================================
  Files         373      388      +15     
  Lines       41166    41345     +179     
==========================================
+ Hits        24978    25115     +137     
- Misses      14133    14172      +39     
- Partials     2055     2058       +3     
Flag Coverage Δ
bats 44.84% <52.45%> (+0.19%) ⬆️
unit-linux 34.21% <20.93%> (-0.08%) ⬇️
unit-windows 24.19% <11.45%> (-0.09%) ⬇️

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.

@@ -102,7 +103,7 @@ func getParserMetric(url string, itemName string) (map[string]map[string]int, er
ival := int(fval)

switch fam.Name {
case "cs_reader_hits_total":
case "cs_reader_hits_total": // What is this ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants