Skip to content

Any reason why Polly create histogram metrics with units as milliseconds and type as double? #2363

Answered by martincostello
lvxiaoxin asked this question in Q&A
Discussion options

You must be logged in to vote

The type is the same as the type of the value we report:

AttemptDuration.Record(executionAttempt.Duration.TotalMilliseconds, tags.TagsSpan);

Duration is a TimeSpan:

/// <summary>
/// Gets the execution duration of the attempt.
/// </summary>
public TimeSpan Duration { get; }

TimeSpan.TotalMilliseconds is a double.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lvxiaoxin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants