Skip to content

Commit

Permalink
Fix resource label output
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr authored and azure-sdk committed Nov 7, 2024
1 parent 3d81feb commit 469855a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ steps:
$timestamp = Get-Date
foreach ($property in $response.resources.PSObject.Properties.Value)
{
Write-Host "logmetric: $( @{ name= "github_rate_limit_remaining_total"; value= $property.remaining; timestamp= $timestamp; labels= @{ user=$env:GITHUB_USER; resource=$property.resource }} | ConvertTo-Json -Compress)"
Write-Host "logmetric: $( @{ name= "github_rate_limit_limit_total"; value= $property.limit; timestamp= $timestamp; labels= @{ user=$env:GITHUB_USER; resource=$property.resource }} | ConvertTo-Json -Compress)"
Write-Host "logmetric: $( @{ name= "github_rate_limit_used_total"; value= $property.used; timestamp= $timestamp; labels= @{ user=$env:GITHUB_USER; resource=$property.resource }} | ConvertTo-Json -Compress)"
$labels = @{ user=$env:GITHUB_USER; resource=$property.resource }
Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_remaining_total"; value= $property.remaining; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"
Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_limit_total"; value= $property.limit; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"
Write-Host "logmetric: $( [ordered]@{ name= "github_ratelimit_used_total"; value= $property.used; timestamp= $timestamp; labels= $labels } | ConvertTo-Json -Compress)"
}
displayName: Check GitHub Rate Limit
env:
Expand Down

0 comments on commit 469855a

Please sign in to comment.