open-policy-agent / open-policy-agent/java-opa-sdk

SLF4J sink for decision events

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

decision-logs services
Dominant language
Java
Stars
16
Forks
24
Avg merge
8h 17m
Merged PRs (30d)
15

Description

The existing opa-slf4j module routes the SDK's operational logger to SLF4J — it doesn't expose decision events as SLF4J log records. Without that, users have to either accept the JSON-array HTTP upload path or scrape the console: true plain-text output to integrate with their existing log pipeline (Logback, ELK, MDC, async appenders).

  • Add an SLF4J sink for decision events (configurable, independent of the service uploader): one log record per event on a dedicated logger name (e.g. io.github.open_policy_agent.opa.decisions).
  • Marker / structured-args support so users can route via Logback's JSON encoder or Logstash encoder.
  • Configurable level (default INFO).
  • Tests: assert events appear on the named logger and survive mask_decision / drop_decision (depends on #73 / #74).
  • Document recommended Logback config snippets for JSON output.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing opa-slf4j module and the decision-event paths behind the JSON-array upload and console: true output. Review #73 and #74 before defining tests for masking and dropping decisions. Done means a configurable dedicated logger emits one event per record with structured arguments or markers, supports a default INFO level, and includes recommended Logback JSON configuration documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.