Skip to content

[ENHANCEMENT]: Field masking #2550

@dpolac

Description

@dpolac

Is your feature request related to a problem? Please describe.

I have secrets (passwords, tokens, api keys) and personal data (names, phone numbers) in my spans. They are deep inside of input and output objects.

Phoenix offers two types of span masking:

However, neither of them achieve my goal of only redacting selected input/output keys.

Describe the solution you'd like

I'd like to have masking configuration that I can apply on the self-hosted server configuration.
Example:

mask_keys:
  given_name: [REDACTED]
  address: [REDACTED]
  api_key: xxxxxxxx
  password: *hiden*
mask_values:
  "[0-9\-]{12,15}": [REDACTED ID NUMBER]

So that the span input:

{
  "user_info": {
    "id": "241",
    "given_name": "John"
  },
  "api_key": "275619824jh2416aa612="
  "value": "1234-6789-123",
  "result": "success"
}

would result in:

{
  "user_info": {
    "id": "241",
    "given_name": "[REDACTED]"
  },
  "api_key": "xxxxxxxx"
  "value": "[REDACTED ID NUMBER]",
  "result": "success"
}

Metadata

Metadata

Labels

enhancementNew feature or requesttriageIssues that require triage

Type

No type

Projects

Status

📘 Todo

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions