Skip to content

[Question]: Customize telemetry event severity? #1859

@wjrogers

Description

@wjrogers

What are you wanting to achieve?

I am using Polly v8 RateLimiter strategies to pro-actively restrict my client's request rate. I noticed that the OnRateLimiterRejected event is logged with Error severity. I want rate limiting events to be logged with at most Information severity because I am imposing the limit on myself. Is there a way to customize event severity?

What code or approach do you have so far?

I poked around the source code and tried a few things like handling RateLimiterStrategyOptions.OnRejected or calling builder.ConfigureTelemetry(new TelemetryOptions()), but I could not find a way to modify the event severity. All the properties exposed through these APIs are read-only.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions