opensearch-project / dashboards-observability

Visualize and explore your logs, traces and metrics data in OpenSearch Dashboards
https://opensearch.org/docs/latest/observability-plugin/index/
Apache License 2.0
16 stars 55 forks source link

[FEATURE] Include Metrics "Prometheus" on OSD Visualize "Create" dialog #1333

Open pjfitzgibbons opened 10 months ago

pjfitzgibbons commented 10 months ago

Is your feature request related to a problem? Metrics Prometheus needs to be presented on OSD Visualize Create dialog.

What solution would you like? Position in similar way as "PPL" visualization option image

Use Icon similar to Line (until UX provides guidance for an alternate.) image

What alternatives have you considered? This is the singular way to add aliases to OSD Visualize Create Dialog

Do you have any additional context?

Existing Observability Plugin Start registration for "PPL" visualization (in dashboards-observability/plugin.ts )

    setupDeps.visualizations.registerAlias({
      name: OBSERVABILITY_EMBEDDABLE_ID,
      title: OBSERVABILITY_EMBEDDABLE_DISPLAY_NAME,
      description: OBSERVABILITY_EMBEDDABLE_DESCRIPTION,
      icon: OBSERVABILITY_EMBEDDABLE_ICON,
      aliasApp: observabilityLogsID,
      aliasPath: `#/explorer/?${CREATE_TAB_PARAM_KEY}=${CREATE_TAB_PARAM[TAB_CHART_ID]}`,
      stage: 'production',
      appExtensions: {
        visualizations: {
          docTypes: [VISUALIZATION_SAVED_OBJECT],
          toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
            description: attributes?.description,
            editApp: observabilityLogsID,
            editUrl: `#/explorer/${VISUALIZATION_SAVED_OBJECT}:${id}`,
            icon: OBSERVABILITY_EMBEDDABLE_ICON,
            id,
            savedObjectType: VISUALIZATION_SAVED_OBJECT,
            title: attributes?.title,
            typeTitle: OBSERVABILITY_EMBEDDABLE_DISPLAY_NAME,
            stage: 'production',
            updated_at: updatedAt,
          }),
        },
      },
    });

Expected registration for Prometheus visualization : (new constants are inlined here for convenience... they will be in separate file on implementation)

   const OBSERVABILITY_PROMQL_EMBEDDABLE_ID="observability-promql"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME="Prometheus"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_DESCRIPTION="Select and save Prometheus Metrics from Prometheus datasources.  Optionally add those Metrics to Dashboards automatically"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_ICON="line". // Or other by UX guidance

    setupDeps.visualizations.registerAlias({
      name: OBSERVABILITY_PROMQL_EMBEDDABLE_ID,
      title: OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME,
      description: OBSERVABILITY_PROMQL_EMBEDDABLE_DESCRIPTION,
      icon: OBSERVABILITY_PROMQL_EMBEDDABLE_ICON,
      aliasApp: observabilityMetricsID,
      aliasPath: `#/`,
      stage: 'production',
      appExtensions: {
        visualizations: {
          docTypes: [VISUALIZATION_SAVED_OBJECT],
          toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
            description: attributes?.description,
            editApp: observabilityMetricsID,
            editUrl: `#/${VISUALIZATION_SAVED_OBJECT}:${id}`,
            icon: OBSERVABILITY_PROMQL_EMBEDDABLE_ICON,
            id,
            savedObjectType: VISUALIZATION_SAVED_OBJECT,
            title: attributes?.title,
            typeTitle: OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME,
            stage: 'production',
            updated_at: updatedAt,
          }),
        },
      },
    });
pjfitzgibbons commented 10 months ago

@kgcreative Who could give UX guidance on an icon for "Prometheus" metric?

kgcreative commented 10 months ago

Work with @canascar for all icon requests

pjfitzgibbons commented 10 months ago

Thanks @kgcreative

canascar commented 10 months ago

@pjfitzgibbons - Looking into this -we currently don't have an icon representing Prometheus at the appropriate sizing required so a new icon will need to be created.

pjfitzgibbons commented 10 months ago

HI Carlos. Could you tell me timeline to come up with a new icon? I've already made backup plan to re-use 'Line' icon, so if a new icon needs to be 2.13 that's OK.

Thanks and Kindest Regards, Peter Fitzgibbons

On Fri, Jan 5, 2024 at 10:01 AM canascar @.***> wrote:

@pjfitzgibbons https://github.com/pjfitzgibbons - Looking into this -we currently don't have an icon representing Prometheus at the appropriate sizing required so a new icon will need to be created.

— Reply to this email directly, view it on GitHub https://github.com/opensearch-project/dashboards-observability/issues/1333#issuecomment-1879062223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACYNTJC7QEHQE4PF6KSR3YNA5YNAVCNFSM6AAAAABBL4BDYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGA3DEMRSGM . You are receiving this because you were mentioned.Message ID: @.*** .com>

canascar commented 10 months ago

We do have an icon visQueryPromQL - would this fit the icon required?

https://oui.opensearch.org/1.3/#/display/icons

We can also possibly use the Prometheus 3rd party logo

pjfitzgibbons commented 10 months ago

Excellent!! Thanks and Kindest Regards, Peter Fitzgibbons

On Fri, Jan 5, 2024 at 10:21 AM canascar @.***> wrote:

Woe do have an icon visQueryPromQL - would this fit the icon required?

https://oui.opensearch.org/1.3/#/display/icons

— Reply to this email directly, view it on GitHub https://github.com/opensearch-project/dashboards-observability/issues/1333#issuecomment-1879086397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACYNVD6BLU7JSR2S2KP33YNBABJAVCNFSM6AAAAABBL4BDYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGA4DMMZZG4 . You are receiving this because you were mentioned.Message ID: @.*** .com>