Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tooltips to registry #5351

Closed
wants to merge 13 commits into from
5 changes: 5 additions & 0 deletions assets/js/registrySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,8 @@ function parseUrlParams() {
selectedLanguage = urlParams.get('language') || 'all';
selectedComponent = urlParams.get('component') || 'all';
}

var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
48 changes: 48 additions & 0 deletions content/en/ecosystem/registry/help.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a help page is a good idea, but something that should be part of a dedicated PR, can you remove this from this PR for now? If you like to help with that feel free to raise another PR adding this page.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Component Types Help

This page provides an overview of the different types of components in the OpenTelemetry ecosystem, including examples and explanations.

## Component Types

### Application Integration
- **Description**: Components that help integrate OpenTelemetry into existing applications or services.
- **Example**: Libraries that enable the export of telemetry data in OpenTelemetry formats.

### Core
- **Description**: Fundamental components that are essential for OpenTelemetry's core functionality.
- **Example**: Core SDKs and libraries that provide basic tracing and metrics support.

### Exporter
- **Description**: Components that handle exporting telemetry data to various backends.
- **Example**: Exporters that send telemetry data to cloud platforms or monitoring services.

### Extension
- **Description**: Additional features that extend the capabilities of the OpenTelemetry Collector.
- **Example**: Plugins or modules that add specific functionalities to the Collector.

### Instrumentation
- **Description**: Libraries for specific programming languages that automatically capture telemetry data from applications.
- **Example**: Java Util Logging Instrumentation for capturing logs in Java applications.

### Log Bridge
- **Description**: Bridges between OpenTelemetry and logging systems, allowing logs to be processed with telemetry data.
- **Example**: Adapters that connect application logs with OpenTelemetry systems.

### Processor
- **Description**: Components that modify or enrich telemetry data before it's exported.
- **Example**: Processors that filter or add metadata to spans before exporting.

### Receiver
- **Description**: Components responsible for receiving telemetry data in various formats.
- **Example**: Receivers that support multiple telemetry protocols, like OTLP or Jaeger.

### Resource Detector
- **Description**: Automatically detects resource information, such as cloud environment metadata.
- **Example**: Components that identify and add resource tags to telemetry data.

### Utilities
- **Description**: Miscellaneous helper tools and libraries that aid in the management and processing of telemetry data.
- **Example**: Utility libraries for handling common data transformations or protocol conversions.

## Additional Resources
- For more information on licenses, visit [Open Source Licenses](https://opensource.org/licenses).
246 changes: 137 additions & 109 deletions layouts/partials/ecosystem/registry/entry.html
Original file line number Diff line number Diff line change
@@ -1,95 +1,96 @@
{{ $languageNames := .languageNames -}}

{{ 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")
-}}
{{
$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")
-}}
Comment on lines -4 to +49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this and other formatting changes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


{{ $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 := "" -}}
{{ 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 -}}
<li class="card my-3 registry-entry {{ $highlightStyle }}" data-registry-id="{{ ._key }}" data-registrytype="{{ .registryType }}" data-registrylanguage="{{ .language }}">
<div class="card-body container">
{{ $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 := "" -}}
{{ 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 -}}
<li class="card my-3 registry-entry {{ $highlightStyle }}" data-registry-id="{{ ._key }}"
data-registrytype="{{ .registryType }}" data-registrylanguage="{{ .language }}">
<div class="card-body container">
<h4 class="card-title mb-0 d-flex flex-row">
<a {{ $primaryHref }} target="_blank" rel="noopener" class="me-auto">
{{- .title | markdownify -}}
{{- .title | markdownify -}}
</a>
<div class="ms-auto">
{{ if $isNew -}}
Expand All @@ -105,7 +106,7 @@ <h4 class="card-title mb-0 d-flex flex-row">
<span class="badge rounded-pill text-bg-secondary text-white" title="This package is used in the OpenTelemetry Demo!"><i class="fa-solid fa-shapes"></i> OTel Demo</span>
{{ end -}}
{{ if $deprecated -}}
<span class="badge rounded-pill text-bg-danger text-white" title=""><i class="fa-solid fa-ban"></i> deprecated</span>
<span class="badge rounded-pill text-bg-danger text-white" title="This package is deprecated. It is recommended to no longer use it and to look for a replacement if it is in use."><i class="fa-solid fa-ban"></i> deprecated</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to add the data-bs-toogle as well?

{{ end -}}
{{ if .cncfProjectLevel -}}
<span class="badge rounded-pill text-bg-primary text-white" title="CNCF {{ .cncfProjectLevel}} Project">
Expand All @@ -116,37 +117,38 @@ <h4 class="card-title mb-0 d-flex flex-row">
</h4>
<p class="card-text">
<small class="text-body-secondary">
by
{{ range $index, $author := .authors -}}
by
{{ range $index, $author := .authors -}}
{{ if $index }}, {{ end }}
{{ if eq $author.name "OpenTelemetry Authors" -}}
<a href="/" class="badge rounded-pill text-bg-primary">🔭 {{ $author.name }} 🔭</a>
<a href="/" class="badge rounded-pill text-bg-primary">🔭 {{ $author.name }} 🔭</a>
{{ else if isset $author "url" }}
{{ $href := printf "href=%q" $author.url | safeHTMLAttr -}}
<a {{ $href }} target="_blank" rel="noopener" class="card-link external-link">{{ $author.name }}</a>
{{ $href := printf "href=%q" $author.url | safeHTMLAttr -}}
<a {{ $href }} target="_blank" rel="noopener" class="card-link external-link">{{ $author.name }}</a>
{{ else -}}
{{ $author.name -}}
{{ $author.name -}}
{{ end -}}
{{ end -}}
{{ end -}}
</small>
</p>
<div class="row p-2">
<div class="col col-md-9 col-lg-10">
<div class="mb-3">
{{ if $deprecated -}}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Deprecated</h4>
{{ .deprecated.reason | markdownify }}
</div>
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Deprecated</h4>
{{ .deprecated.reason | markdownify }}
</div>
{{ end -}}
{{- .description | markdownify -}}
</div>
{{ with $package -}}
{{ if not (eq .quickInstall false) }}
<h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
<p>{{ (partial .installTemplate .) | markdownify -}}
</p>
{{ end -}}
{{ if not (eq .quickInstall false) }}
<h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
<p>{{ (partial .installTemplate .) | markdownify -}}
</p>

{{ end -}}
{{- end -}}
</div>
<div class="col col-md-3 col-lg-2">
Expand All @@ -167,7 +169,17 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
<div class="fw-bold">
{{ $languageNames.Get . | default (humanize .) }}
</div>
<small>Language</small>
{{ if eq (replace (lower .) " " "") "collector" }}
<small data-bs-toggle="tooltip"
title="Collector: This is an extension for the OpenTelemetry Collector.">
<a href="https://opentelemetry.io/docs/collector/" target="_blank" class="text-muted">Collector</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a href="https://opentelemetry.io/docs/collector/" target="_blank" class="text-muted">Collector</a>
Collector

skip the link for now

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


</small>
{{ else }}
<small data-bs-toggle="tooltip" title="This indicates the programming language used.">
{{ . }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ . }}
Language

</small>
{{ end }}
</div>
</li>
{{- end }}
Expand All @@ -177,7 +189,9 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
<div class="fw-bold">
{{ . | humanize }}
</div>
<small>Component</small>
<small data-bs-toggle="tooltip" title="This refers to the type of registry component. For more details, visit our Help page.">
<a href="https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/ecosystem/registry/help.md" target="_blank" class="text-muted">Component</a>
</small>
Comment on lines +192 to +194
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's skip this for now

</div>
</li>
{{- end -}}
Expand All @@ -187,7 +201,17 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
<div class="fw-bold">
{{ . }}
</div>
<small>License</small>
{{ if eq . "Commercial" }}
<small data-bs-toggle="tooltip"
title="Commercial License: This project has a commercial license. End users may need to check with the provider for specific usage rights and restrictions. For more details on common license types, visit the Open Source Initiative at opensource.org/licenses.">
<a href="https://opensource.org/licenses" target="_blank" class="text-muted">License</a>
</small>
{{ else }}
<small data-bs-toggle="tooltip"
title="Open-Source License: This project is distributed under an open-source license. End users are encouraged to review the license terms to ensure compatibility with their usage. Visit the Open Source Initiative for more details.">
<a href="https://opensource.org/licenses" target="_blank" class="text-muted">License</a>
</small>
{{ end }}
Comment on lines +204 to +214
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ if eq . "Commercial" }}
<small data-bs-toggle="tooltip"
title="Commercial License: This project has a commercial license. End users may need to check with the provider for specific usage rights and restrictions. For more details on common license types, visit the Open Source Initiative at opensource.org/licenses.">
<a href="https://opensource.org/licenses" target="_blank" class="text-muted">License</a>
</small>
{{ else }}
<small data-bs-toggle="tooltip"
title="Open-Source License: This project is distributed under an open-source license. End users are encouraged to review the license terms to ensure compatibility with their usage. Visit the Open Source Initiative for more details.">
<a href="https://opensource.org/licenses" target="_blank" class="text-muted">License</a>
</small>
{{ end }}
{{ if eq . "Commercial" }}
<small data-bs-toggle="tooltip"
title="Commercial License: This project has a commercial license. End users may need to check with the provider for specific usage rights and restrictions.">
License
</small>
{{ else }}
<small data-bs-toggle="tooltip"
title="Open-Source License: This project is distributed under an open-source license. End users are encouraged to review the license terms to ensure compatibility with their usage.">
License
</small>
{{ end }}

Let's remove the links for now, we can improve on that in a later iteration

</div>
</li>
{{- end -}}
Expand All @@ -206,7 +230,10 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{- end -}}
{{ with $package -}}
{{ $packageUrl := printf "href=%q" (printf .urlPattern .name) | safeHTMLAttr -}}
<a {{ $packageUrl }} target="_blank" rel="noopener" class="card-link"><i class="{{ .icon }}" aria-hidden="true"></i>&nbspPackage Details ({{ .registry }})</a>
<a {{ $packageUrl }} target="_blank" rel="noopener" class="card-link"
title="View package details on {{ .registry }}">
<i class="{{ .icon }}" aria-hidden="true"></i>&nbspPackage Details ({{ .registry }})
</a>
{{- end -}}
{{ with .urls.repo -}}
{{ $icon := cond ( hasPrefix . "https://github.com/" ) "fa-brands fa-github" "fab fa-git-alt" -}}
Expand All @@ -215,8 +242,9 @@ <h6><i class="fa-solid fa-forward"></i> Quick Install</h6>
{{- end -}}
{{ with .urls.demo -}}
{{ $demoUrl := printf "href=%q" (printf .) | safeHTMLAttr -}}
<a {{ $demoUrl }} target="_blank" rel="noopener" class="card-link"><i class="fa-solid fa-shapes" aria-hidden="true"></i>&nbsp;Demo Service</a>
<a {{ $demoUrl }} target="_blank" rel="noopener" class="card-link"><i class="fa-solid fa-shapes"
aria-hidden="true"></i>&nbsp;Demo Service</a>
{{- end -}}
</div>
</li>
{{ end -}}
</div>
</li>
{{ end -}}