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

Detail Levels Seem To Be Ignored When Defined In Ruleset File #24

Closed
hannahchiodo-msft opened this issue Mar 29, 2024 · 3 comments
Closed
Assignees

Comments

@hannahchiodo-msft
Copy link

My filter file reports at the expected detail level if I don't use a ruleset, e.g.:

keynames:
  nickname_key: "otel.trace2.nickname"

nicknames:
  "office": "dl:process"

defaults:
  ruleset: "dl:drop"

However, when I use a separate ruleset file, it seems to use the default detail level regardless:

keynames:
  nickname_key: "otel.trace2.nickname"

nicknames:
  "office": "rs:office"

rulesets:
  "rs:office": "C:/ProgramData/git-telemetry-service/rs-office.yml"

defaults:
  ruleset: "dl:drop"

My ruleset file:

commands:
  "git:config":             "dl:drop"
  "git:cat-file":           "dl:drop"
  "git:maintenance":        "dl:drop"
  "git:for-each-repo":      "dl:drop"

default:
  detail: "dl:process"

Yet whatever detail level I set in the ruleset, it still reports at the default detail level.

@jeffhostetler
Copy link
Collaborator

Try changing "default:" to "defaults:" in your ruleset file.

@jeffhostetler jeffhostetler self-assigned this Mar 29, 2024
@jeffhostetler
Copy link
Collaborator

I'm surprised it didn't throw an error for an undefined key.

@hannahchiodo-msft
Copy link
Author

Yep, using defaults instead of default fixed it - glad this was an easy fix on my end. It does seem surprising that validation didn't catch this.

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

No branches or pull requests

2 participants