Skip to content

Report user principal tag in metrics #2444

@fivetran-kostaszoumpatianos

Description

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

Currently we emit various metrics and have the option of tagging them with the realm-id, when polaris.metrics.realm-id-tag.enable-in-api-metrics=true.
In some cases it would be useful to also annotate the metrics with a user-principal tag, such that specific issues can be better traced at a user level.

Describe the solution you'd like

We could add a polaris.metrics.user-principal-tag.enable-in-api-metrics=true.

The user principal is already present in the SecurityContext, which can be easily annotated with a MeterTag in the api template.

Describe alternatives you've considered

We could log the catalog name but this is more complicated and would require a more intrusive change.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions