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

[Feature request] Standard conventions for icon and color of resources and/or spans #1266

Open
michaelsafyan opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
area:new enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage

Comments

@michaelsafyan
Copy link
Contributor

Area(s)

area:new

Is your change request related to a problem? Please describe.

In tracing systems, it is useful to use icons and colors to differentiate components.

If someone uses multiple tracing systems, they may have to configure the display multiple times for each system.

In addition, tracing systems must currently implement a separate control plane to manage/configure the display and color when there is already a path for data to enter the system via span attributes.

Describe the solution you'd like

It should be possible to hint at the desired icon and color in the resource or span attributes.

While tracing systems may still wish to provide a way to override these hints, the presence of these hints would serve as a useful baseline for configuring the default display behavior of the tracing system.

As a strawman proposal:

  • display.icon: Hints at the icon that should be used. This is a comma-separated list containing entries of the form: <namespace>:<name>. The namespace mdi for "material design icons" (based on Google's Material Icon Font) is expected to be supported on systems that support display.icon. Tracing systems may optionally support additional namespaces, which are to be documented by the tracing system provider. The first entry that exists/works in the comma-separated list will be the one that is used (unless overridden by the user somewhere else).
  • display.color: Hints at the color that should be used. Can contain color names, CSS-style hex values prefixed with #, CSS-style rgb() function calls, CSS-style rgba() function calls. Given that not all color names may be supported on all systems and given that commas are used in rgb() and rgba(), uses ; to provide a list.

Examples:

  • display.icon: gcp:cloudsql,mdi:database
  • display.color: google_blue;cerulean;blue;#0000ff

Describe alternatives you've considered

Alternatives include:

  • Not doing this at all; using configuration elsewhere to drive the display: although separate configuration has its benefits, it can be a challenge for configuring multiple systems and can create repetitive configuration work.

  • Supporting only one syntax for color: if only named colors were supported, it would be difficult to guarantee a fallback that will actually work; if only precise CSS colors were supported, then it would be difficult to supply names that can be dynamically evaluated (e.g. map to different actual colors in light mode vs dark mode), which could be limiting in the case where a particular provider has some support for theming.

  • Supporting only one entry for color: given that color names (especially ones that reference a particular color palette or theme) may be unrecognized in some systems, lists are needed to ensure that there is some fallback.

  • Supporting only one entry for icon: this would make it difficult for vendors to provide special support for icons corresponding to services in their platform. Multiple entries allows for fallback for unrecognized icons.

  • Not supporting a well-defined namespace for icons out of the box: this would be a problem for being able to provide a reasonably working fallback solution

  • Supporting a baseline namespace other than mdi: : the reason that Material Design Icons make sense to use as a default option is that it is both open-source and free to use (including commercially). If there is another icon font that is both open-source and free (even for commercial use), such an alternative could be reasonably suggested.

Additional context

No response

@michaelsafyan michaelsafyan added enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage labels Jul 19, 2024
@nirga
Copy link
Contributor

nirga commented Jul 19, 2024

Interesting! I assume you expect these to be part of semantic conventions for each span definition which can then be read by the observability platform?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:new enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants