-
Notifications
You must be signed in to change notification settings - Fork 24
non flat fields not displayed in log/table output #393
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
Comments
Hi @curuvija, I'm having trouble reproducing this - if I mock the response with your data I can see all the non-flat fields. To help debugging this, I have a few questions:
![]() Thanks a lot! |
hi @idastambuk thanks for helping me. Here are the details:
In the response schema I see "resource" as a field of type struct. Could it be that "resource.attributes.k8s@pod@uid" breaks it since it contains "@" symbol? Kind regards, |
Hi again @curuvija, I've tried to reproduce this, but if I mock the response with this data instead of nulls:
as the value of the "resource" field, the plugin returns the field to Grafana flattened. It returns as a separate |
hi @idastambuk, I've tried it and I got: It works when I try with fields without @ symbol. |
If you don't specify the field in the query, do you get the same error and if not, which form do you get the resource data in? |
In that case it doesn't look like a problem with the plugin, rather than those fields not being populated in OpenSearch. I would suggest debugging it in your Open Search instance. Since fields are being flattened in Grafana OpenSearch plugin fine, I will close this ticket. |
thanks a lot @idastambuk for your help. |
What happened:
Hi, we use opentelemetry to ingest data into AWS opensearch domain and add some additional fields to each log using processors. In opensearch we see clearly those fields ingested. This is one example log bellow in json format taken from opensearch:
{ "_index": "logs-test-cluster-platform-experiment", "_id": "V_x6pI8BYBiqWICg75zT", "_version": 1, "_score": null, "_source": { "traceId": "", "spanId": "", "severityText": "", "flags": 0, "time": "2024-05-23T08:04:30.512773595Z", "severityNumber": 0, "droppedAttributesCount": 0, "serviceName": null, "body": "{\"level\":\"info\",\"ts\":1716451470.5126758,\"msg\":\"TracesExporter\",\"kind\":\"exporter\",\"data_type\":\"traces\",\"name\":\"logging\",\"resource spans\":1,\"spans\":4}", "observedTime": "2024-05-23T08:04:30.534179549Z", "schemaUrl": "", "log.attributes.time": "2024-05-23T08:04:30.512773595Z", "resource.attributes.k8s@namespace@name": "tracing", "resource.attributes.k8s@deployment@name": "otel-tracing-collector-opentelemetry-collector", "resource.attributes.k8s@container@name": "opentelemetry-collector", "log.attributes.logtag": "F", "log.attributes.data_type": "traces", "resource.attributes.k8s_cluster_name": "test-cluster-platform", "resource.attributes.k8s@pod@start_time": "2024-05-22T20:00:30Z", "log.attributes.log@iostream": "stderr", "log.attributes.name": "logging", "resource.attributes.k8s@pod@name": "otel-tracing-collector-opentelemetry-collector-5dd8ccfc56-ksdf8", "log.attributes.log@file@path": "/var/log/pods/tracing_otel-tracing-collector-opentelemetry-collector-5dd8ccfc56-ksdf8_b87c0718-6690-4a31-9953-4aa03c2b4c2f/opentelemetry-collector/0.log", "resource.attributes.k8s@pod@uid": "b87c0718-6690-4a31-9953-4aa03c2b4c2f", "resource.attributes.k8s@node@name": "ip-10-3-15-81.eu-central-1.compute.internal", "log.attributes.spans": 4, "log.attributes.ts": 1716451470.5126758, "log.attributes.resource spans": 1, "log.attributes.msg": "TracesExporter", "log.attributes.kind": "exporter", "resource.attributes.k8s@container@restart_count": "0", "resource.attributes.kubernetes_cluster_name": "test-cluster-platform", "log.attributes.level": "info" }, "fields": { "log.attributes.time": [ "2024-05-23T08:04:30.512Z" ], "resource.attributes.k8s@pod@start_time": [ "2024-05-22T20:00:30.000Z" ], "time": [ "2024-05-23T08:04:30.512Z" ], "observedTime": [ "2024-05-23T08:04:30.534Z" ] }, "sort": [ 1716451470512 ] }
When we use opensearch datasource in Grafana to display logs we don't see non flat fields like "resource.attributes.k8s@namespace@name":
When we inspect the data using query inspector we don't even see those fields pulled from opensearch:
What you expected to happen:
I expect to see all other fields in the log output.
How to reproduce it (as minimally and precisely as possible):
Use otel collector to ingest some data with resource processor.
Anything else we need to know?:
No.
Environment:
The text was updated successfully, but these errors were encountered: