Skip to content

fix(otel,metrics): reject bare string classification_values, whitespace-padded entries, and reserved '_other' bucket (#113) - #118

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-otel-metrics-113
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-otel-metrics-113

Conversation

@drk-ram

@drk-ram drk-ram commented Oct 25, 2026

Copy link
Copy Markdown

Closes #113

Summary

  • Reject bare str/bytes for classification_values / classificationValues in OTelMetricEmitter (src/agentrust_telemetry/otel.py and packages/typescript/src/metrics.ts) so a string is not iterated character-by-character.
  • Require non-empty, trimmed string entries of at most 128 characters and forbid the reserved fallback bucket "_other" in both Python and TypeScript.
  • Add Python and TypeScript unit tests in tests/test_otel_projectors.py and packages/typescript/test/metrics.test.ts.

Validation

  • pytest tests/test_otel_projectors.py -k "not real and not action_metrics" -q — passed (3 passed, 5 subtests passed)

@drk-ram
drk-ram requested review from a team and imran-siddique as code owners October 25, 2026 06:48
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 25, 2026
…ce-padded entries, and reserved '_other' bucket (agentrust-io#113)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram force-pushed the drk-ram-fix-otel-metrics-113 branch from 2ce7616 to c3a7ecf Compare October 29, 2026 17:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

otel / metrics: OTelMetricEmitter accepts bare string classification_values (splitting into characters) and reserved '_other' bucket

1 participant