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

data is not stored in the format of [<metric_name>: <value>] in OpenSearch. #4281

Open
mothercow-dev opened this issue Mar 14, 2024 · 6 comments
Labels
question Further information is requested

Comments

@mothercow-dev
Copy link

mothercow-dev commented Mar 14, 2024

Versions:
opensearch & opensearch dashboard 2.11.1
data-prepper 2.6.1
opentelemetry-collector-contrib 0.92.0

When utilizing DataPrepper's metric pipeline to transmit data collected through OpenTelemetry to OpenSearch, the data is not stored in the format of <metric_name> : <value> in OpenSearch.

OTLE collector to collect kubelet data.
If you check in the opensearch dashboard, the metric name is stored in the name field.

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

It seems to save as

I want to easily use the visualization features you provide.

{ 
    <metric_name>: <value>
}

, is it possible to change it to something like this?

[name field]
스크린샷 2024-03-14 오후 3 40 48

[data-prepper config]
스크린샷 2024-03-14 오후 3 43 34

@KarstenSchnitter
Copy link
Collaborator

KarstenSchnitter commented Mar 14, 2024

The issue here is the limitations to 1000 fields per index. If your suggestion is followed, this limit will be reached pretty fast. Additionally, this creates a lot of sparse fields, which might impact performance badly. Also note, that the current format follows the OpenTelemetry metrics data model.

@dlvenable dlvenable added question Further information is requested and removed untriaged labels Mar 19, 2024
@dlvenable
Copy link
Member

@mothercow-dev , The point that @KarstenSchnitter made is good and explains the reason why we do it this way.

Because of that, I don't think we would support this in the otel_metrics source and processor. However, you could use a processor to make the transformation. I would not suggest that because of the issues @KarstenSchnitter made, but it would be possible.

Is there a particular reason you want this format?

@mothercow-dev
Copy link
Author

@KarstenSchnitter , Thank you

@dlvenable ,
While creating a Visualize for opensearchd, I was not seeing the metric name of the kubeletstatreceiver collected in Available fields, so I asked a question.

As I understand it, when I create a Visualize, I can create it through the values in Available fields.

Based on your description, can I use the processor in data-prepper to convert it to what I want?
<metric_name> : <value>

@KarstenSchnitter
Copy link
Collaborator

I am currently working on a dashboard for the kubeletstatreceiver metrics in OpenSearch with data ingested via DataPrepper. You can use saved searches to filter by the name field or use the filters aggregation, that supports arbitrary DQL expressions. If you use TSVB visualizations, you can provide a global DQL expression for the visualization. This allows to visualize the value of the data points quite nicely.

@dlvenable do you think, it would make sense to write an OpenSearch blog post about visualizing metrics data ingested that way? @mothercow-dev would that be helpful to you?

@mothercow-dev
Copy link
Author

HI,

@KarstenSchnitter
It will be a great help in configuring visualizations in opensearch dashboards.

@KarstenSchnitter
Copy link
Collaborator

@mothercow-dev the blog post has been published at https://opensearch.org/blog/opentelemetry-metrics-visualization/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

3 participants