Skip to content

Set up Datadog metrics for prompt injection detection#5316

Closed
dorien-koelemeijer wants to merge 5 commits intoblock:mainfrom
dorien-koelemeijer:feat/prompt-injection-metrics
Closed

Set up Datadog metrics for prompt injection detection#5316
dorien-koelemeijer wants to merge 5 commits intoblock:mainfrom
dorien-koelemeijer:feat/prompt-injection-metrics

Conversation

@dorien-koelemeijer
Copy link
Collaborator

Summary

Adding some initial metrics to be consumed in Datadog.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)
    Observability improvement.

Related Issues

Related PR: #4237

});
} else if analysis_result.is_malicious {
tracing::warn!(
counter.goose.prompt_injection_finding = 1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

you're logging essentially the same thing on 76, 96 and 117 - I think you probably just want to log the same record just with different values; suggest to unify that.

Copy link
Collaborator Author

@dorien-koelemeijer dorien-koelemeijer Oct 23, 2025

Choose a reason for hiding this comment

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

I think I may leave it as is for now, I'm planning to play around with metrics and logs a bit and will need to determine what will stay and needs to go longer term anyway, so can do one big uplift at that stage

Copy link
Collaborator

Choose a reason for hiding this comment

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

that arguments rather cuts both ways though; why not simplify it for now while you figure out what you want?

Copy link
Collaborator Author

@dorien-koelemeijer dorien-koelemeijer Oct 24, 2025

Choose a reason for hiding this comment

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

Fair enough, have cleaned up. Would you mind unblocking the 3 workflows checks below that require approval (I can't unblock these myself)? Thanks!

@dorien-koelemeijer
Copy link
Collaborator Author

Created #5385 instead (not from forked repo)

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