OTEL metrics storage in OpenSearch not easily usable in OpenSearch Dashboards

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch and OpenSearch Dashboards 2.7.0,
DataPrepper 2.2.1
and OTEL Collector contrib 0.75.0.

Describe the issue:
When using a metrics pipeline in DataPrepper receiving metrics data from OTEL Collector the metrics are not stored in an easy to use format in OpenSearch, see example:

{
  "_index": "metrics-otel-v1-2023.05.22",
  "_id": "dm5FQ4gBVU75l2XQySNf",
  "_version": 1,
  "_score": null,
  "_source": {
    "kind": "SUM",
    "flags": 0,
    "description": "Time spent in disk operations.",
    "serviceName": null,
    "schemaUrl": "https://opentelemetry.io/schemas/1.9.0",
    "isMonotonic": true,
    "unit": "s",
    "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE",
    "exemplars": [],
    "name": "system.disk.operation_time",
    "startTime": "2023-05-19T12:16:59Z",
    "time": "2023-05-22T11:43:44.022425Z",
    "value": 1421.1076041,
    "instrumentationScope.name": "otelcol/hostmetricsreceiver/disk",
    "metric.attributes.device": "C:",
    "resource.attributes.host@name": "xxx",
    "resource.attributes.os@type": "xxx",
    "resource.attributes.host@id": "xxx",
    "metric.attributes.direction": "read",
    "instrumentationScope.version": "0.77.0"
  },
  "fields": {
    "startTime": [
      "2023-05-19T12:16:59.000Z"
    ],
    "time": [
      "2023-05-22T11:43:44.022Z"
    ]
  },
  "sort": [
    1684755824022
  ]
}

Since the metric is in essence this format:

{
   name: <metric_name>
   value:  <sample_value>
}

the built-in visualization types like line, bars and so on cannot be used out of the box.
This is a burden for our planned monitoring solution since users have to learn either Vega or using PPL also for simple things.

When using metricbeat, the metrics would be stored as

{
    <metric_name>:  <sample_value>
}

which allows to use the provided visualizations.

What was the reason to store metrics in the other, not so convenient format? And will there be support in OpenSearch Dashboards to make the visualizations (other than PPL or Vega) usable for this OTEL format?

Configuration:

metrics-pipeline:
  source:
    otel_metrics_source:
      ssl: false
      port: 22022
  processor:
    - otel_metrics_raw_processor:
        calculate_histogram_buckets: true
        calculate_exponential_histogram_buckets: true
        exponential_histogram_max_allowed_scale: 10
        flatten_attributes: true
  sink:
    - opensearch:
        hosts: [ "https://opensearch.local:9200" ]
        insecure: true
        index: metrics-otel-v1-%{yyyy.MM.dd} 

Relevant Logs or Screenshots:
n.a.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.