{{ $languageNames := .languageNames -}} {{ $registryUrl := .registryUrl -}} {{ with .value -}} {{ $remoteRegistries := dict "npm" (dict "urlPattern" "https://npmjs.com/package/%s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "installLine" "npm install %s" "icon" "fab fa-npm") "packagist" (dict "urlPattern" "https://packagist.org/packages/%s" "installLine" "composer require %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fa-solid fa-box-open") "gems" (dict "urlPattern" "https://rubygems.org/gems/%s" "installLine" "gem install %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fa-solid fa-gem") "go" (dict "urlPattern" "https://pkg.go.dev/%s" "installLine" "go get %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fa-brands fa-golang") "go-collector" (dict "urlPattern" "https://pkg.go.dev/%s" "installTemplate" "ecosystem/registry/quickinstall/collector.md" "icon" "fa-solid fa-box-open") "nuget" (dict "urlPattern" "https://www.nuget.org/packages/%s" "installLine" "dotnet add package %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fa-solid fa-box-open") "pip" (dict "urlPattern" "https://pypi.org/project/%s" "installLine" "pip install %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fa-brands fa-python") "hex" (dict "urlPattern" "https://hex.pm/packages/%s" "installTemplate" "ecosystem/registry/quickinstall/hex.md" "icon" "fa-brands fa-erlang") "crates" (dict "urlPattern" "https://crates.io/crates/%s" "installLine" "cargo add %s" "installTemplate" "ecosystem/registry/quickinstall/default.md" "icon" "fab fa-rust") "maven" (dict "urlPattern" "https://maven.org/artifact/%s" "installTemplate" "ecosystem/registry/quickinstall/maven.md" "icon" "fa-solid fa-feather") -}} {{ $isNative := and (or (eq .registryType "instrumentation") (eq .registryType "application integration")) (.isNative) }} {{ $isFirstParty := and (or (eq .registryType "instrumentation") (eq .registryType "application integration")) (.isFirstParty) }} {{ $currentTime := (time now) -}} {{ $delta := $currentTime.Sub (time.AsTime .createdAt) -}} {{ $isNew := lt $delta.Hours 730 -}} {{ $usedInDemo := and (isset . "urls") (isset .urls "demo") }} {{ $deprecated := and (isset . "deprecated") (isset .deprecated "reason") }} {{ $package := "" -}} {{ if and (.package) (isset $remoteRegistries .package.registry) -}} {{ $package = merge .package (index $remoteRegistries .package.registry) -}} {{ $package = merge $package (dict "type" .registryType) -}} {{ end -}} {{ $highlightStyle := "border-default" -}} {{ if $isNew -}} {{ $highlightStyle = "border-info" -}} {{ end -}} {{ if $isNative -}} {{ $highlightStyle = "border-success" -}} {{ end -}} {{ if $isFirstParty -}} {{ $highlightStyle = "border-success" -}} {{ end -}} {{ if $usedInDemo -}} {{ $highlightStyle = "border-secondary" -}} {{ end -}} {{ if $deprecated -}} {{ $highlightStyle = "border-danger" -}} {{ end -}} {{ $primaryUrl := "" -}} {{ if .urls.repo -}} {{ $primaryUrl = .urls.repo -}} {{ else if .urls.website -}} {{ $primaryUrl = .urls.website -}} {{ else if .urls.docs -}} {{ errorf "The %q registry entry requires a repo or website URL." .title }} {{ end -}} {{ $primaryHref := printf "href=%q" $primaryUrl | safeHTMLAttr -}} {{ $flags := slice -}} {{ if $isNew -}} {{ $flags = $flags | append "new" -}} {{ end -}} {{ if $isNative -}} {{ $flags = $flags | append "native" -}} {{ end -}} {{ if $isFirstParty -}} {{ $flags = $flags | append "first_party" -}} {{ end -}} {{ if $usedInDemo -}} {{ $flags = $flags | append "used_in_demo" -}} {{ end -}} {{ if $deprecated -}} {{ $flags = $flags | append "deprecated" -}} {{ end -}}
by {{ range $index, $author := .authors -}} {{ if $index }}, {{ end }} {{ if eq $author.name "OpenTelemetry Authors" -}} 🔠{{ $author.name }} 🔠{{ else if isset $author "url" }} {{ $href := printf "href=%q" $author.url | safeHTMLAttr -}} {{ $author.name }} {{ else -}} {{ $author.name -}} {{ end -}} {{ end -}}
{{ (partial .installTemplate .) | markdownify -}}
{{ end -}} {{- end -}}