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

[APM ]APM "Services > Metrics" Tab doesn't work if embedded dashboard includes ES|QL visualizations #215675

Open
JonasKunz opened this issue Mar 24, 2025 · 5 comments · May be fixed by #216358
Open
Assignees
Labels
bug Fixes for quality problems that affect the customer experience OpenTelemetry Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@JonasKunz
Copy link
Contributor

Kibana version: Tested on 9.1.0

Elasticsearch version: 9.1.0

Describe the bug:

I've been working on adding a new, Otel-native dashboard for Java for the Services > Metrics observability tab-
Due to requiring multi-step aggregations, I chose to use ES|QL for some of the panels.

Unfortunately it looks like the metrics tab can't deal with dashboards containing ES|QL visualizations. When going to the tab, the dashboard remains empty and the following error shows up:

Image

If I remove all ES|QL visualizations from the dashboard, the error disappears and the dashboard loads.

At the same time importing the dashboard with the ES|QL visualizations and linking it from the Service > Dashboards tab works without problems.

Steps to reproduce:

Add the following file as embedded dashboard for the metrics tab:

otel_native-edot-java.json

Ingest some otel data and navigate to the tab metrics tab of the service.

@JonasKunz JonasKunz added the bug Fixes for quality problems that affect the customer experience label Mar 24, 2025
@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 24, 2025
@AlexanderWert AlexanderWert added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Mar 24, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Mar 24, 2025
@AlexanderWert AlexanderWert changed the title APM "Services > Metrics" Tab doesn't work if embedded dashboard includes ES|QL visualizations [APM ]APM "Services > Metrics" Tab doesn't work if embedded dashboard includes ES|QL visualizations Mar 24, 2025
@jennypavlova
Copy link
Member

jennypavlova commented Mar 25, 2025

To render the dashboards, we use the DashboardRenderer here. The dashboard files are in the dashboards folder.

Comparing to the usage in the Dashboards tab in case of the metrics we have the logic to map the layers here. Then comparing to the other dashboards we have textBased ({"datasourceStates\":{"textBased":{"layers":,.......) in the java dashboard file linked and not formBased like for example in the otel_native-edot-python.json file - I am not familiar with the dashboard content: @JonasKunz Is that something we can change to match the previous format and try again? Or is this somehow related to the ES|QL visualizations?

Edit Some follow-up questions: What is the difference between textBased and formBased in those dashboards context? Can we have both at the same time, or is it always one of those?
As a solution from our side, we can add a fallback to check for textBased in case formBased is not present in the datasourceStates, which should fix the issue, but I am trying to understand the context here first

@jennypavlova jennypavlova self-assigned this Mar 25, 2025
@JonasKunz
Copy link
Contributor Author

I'm not aware of the underlying JSON schema. The dashboard was simply built via kibana and then exported via the "Saved Objects" settings. However, when removing the ES|QL visualizations from the dashboard everything works. So my guess is that the presence of those changes the serialization somehow?

I followed this internal guide for updating the dashboard.

@jennypavlova
Copy link
Member

The dashboard was simply built via kibana and then exported via the "Saved Objects" settings.

@JonasKunz thanks for answering! My guess here is that those textBased and formBased are both valid cases and the second one is used when ES|QL visualization is used - that's what I am trying to understand, and as I mentioned, I am not familiar with the exported dashboards; that's why I asked 😅

So my guess is that the presence of those changes the serialization somehow?

I think the issue is in the logic to map the layers here we have and It probably worked fine before because we didn't have ES|QL visualizations. So what I will try now is to verify if the fix I have in mind solves this issue using the file you attached.

@jennypavlova
Copy link
Member

@JonasKunz I opened a draft: Can you please check if it works for the service you instrumented?
I have only a remote cluster with OTel data atm (no EDOT, unfortunately), and when I changed the index (because I saw an error that the index was not available), I was able to see the first visualization with some twicks

Image

I can try to set up an env with java edot next week to check it as well. If you have specific requirements on how to do it, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience OpenTelemetry Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants