observability
Datadog🔗
Evaluate Impact on Pricing Based On Contributors In A Repository🔗
Some of the pricing models reflect based on the number of active contributors in a repository. For example, the CI/Pipeline integration is based on a model of who's contributing.
This snippet will assess unique contributors in the repo and based on a rough On-Demand pricing you can find on the website, roughly approx the impact to enabling this feature directly against this repository.
Figuring Out Pricing Based On Contributors in Git
CalcDatadogPricing.ps1
$DatadogPerContributorPricing = 8 # Get from datadog pricing site
$LookBack = -6
$month = Get-Date -Format 'MM'
$year = Get-Date -Format 'yyyy'
$since = "$((Get-Date -Day 1 -Month $month -Year $year).AddMonths($LookBack).AddDays(-1).ToString('yyyy-MM'))"
$until = "$((Get-Date).AddMonths(1).AddDays(-1).ToString('yyyy-MM')))"
# $contributors =
$stats = &git log --date="format-local:%Y-%m" --pretty=format:"%ad %ae" --since="$since" --until="$until" |
ConvertFrom-Csv -Delimiter ' ' -Header 'month', 'contributor' |
Sort-Object -Property 'month', 'contributor' -Descending -Unique
$report = $stats | Group-Object -Property 'month' | ForEach-Object {
[pscustomobject]@{
month = $_.Name
ContributorCount = $_.Count
approxCost = ($_.Count * $DatadogPerContributorPricing).ToString('C0')
}
}
Write-Host '==== Pricing Consideration for Observability on Repo Based on Contributors Per Month ====' -ForegroundColor Green
Write-Host "$($report | Format-Table -AutoSize -Wrap | Out-String)" -ForegroundColor DarkGray
Last update:
2023-09-16
Created: 2023-09-16
Created: 2023-09-16