Hi Everyone, I have a springboot 2.7.18 applicatio...
# general
j
Hi Everyone, I have a springboot 2.7.18 application that uses io.opentelemetry. instrumentation: opentelemetry spring boot starter: 2.15.0 to send logs, metrics, and traces to my local OpenObserve server running on localhost:5080 in docker. My question is that when I click on traces, an error message pops up saying Trace 5cf2472c3c98199fbd3739537c2ea4d4 not found.
m
@Simran(OpenObserve) can you please help check this.
👀 1
@Jian Wang Can you share what you see in the network tab -> Response ( for the 400 bad request) when the error message pops up saying Trace 5cf2472c3c98199fbd3739537c2ea4d4 not found.
u
Hey Jian, can you please help with the schema of your stream, particularly the fields?
j
Copy code
GET /api/default/demo/traces/latest?filter=trace_id%3D%27ff603ac6896c220d8ebd548477d1f748%27&start_time=1779092083980606&end_time=1779095744008326&from=0&size=1Request

HTTP/1.1 400 Bad Request

{
    "code": 20004,
    "message": "Search field not found: Schema error: No field named reference_parent_span_id. Valid fields are demo._timestamp, demo.duration, demo.end_time, demo.operation_name, demo.service_name, demo.span_status, demo.start_time, demo.trace_id.",
    "error_detail": "",
    "trace_id": "019e3dd0cac57642809b751816a694d5"
}
Here are all 22 fields
Copy code
[
    "_timestamp",
    "body",
    "dropped_attributes_count",
    "host_arch",
    "host_name",
    "instrumentation_library_name",
    "os_description",
    "os_type",
    "process_command_line",
    "process_executable_path",
    "process_pid",
    "process_runtime_description",
    "process_runtime_name",
    "process_runtime_version",
    "service_instance_id",
    "service_name",
    "severity",
    "telemetry_distro_name",
    "telemetry_distro_version",
    "telemetry_sdk_language",
    "telemetry_sdk_name",
    "telemetry_sdk_version"
]
The version of OpenObserve is
v0.90.0-rc3
, commit id is
b4806e26c0cd08eb34de75927e0a5bd3b3446387
.
u
okay, it seems like the demo app is just pushing a single root span to the stream without the
reference_parent_span_id
attribute. The API should not throw an error in this case and show that single span. Since your stream schema does not have this attribute the api call is failing. Can you try adding
reference_parent_span_id
to the stream schema with data type utf8 and see?
j
OK, I am trying.
I don't know how to add a field. This is what I googled. Am I doing right?
Actually I have made a mistake, the previous json array was the schema of logs stream. The schema of traces is here.
Copy code
[
    "_timestamp",
    "client_address",
    "duration",
    "end_time",
    "events",
    "flags",
    "http_request_method",
    "http_response_status_code",
    "http_route",
    "links",
    "network_peer_address",
    "network_peer_port",
    "network_protocol_version",
    "operation_name",
    "server_address",
    "server_port",
    "service_host_arch",
    "service_host_name",
    "service_name",
    "service_os_description",
    "service_os_type",
    "service_process_command_line",
    "service_process_executable_path",
    "service_process_pid",
    "service_process_runtime_description",
    "service_process_runtime_name",
    "service_process_runtime_version",
    "service_service_instance_id",
    "service_telemetry_distro_name",
    "service_telemetry_distro_version",
    "service_telemetry_sdk_language",
    "service_telemetry_sdk_name",
    "service_telemetry_sdk_version",
    "span_id",
    "span_kind",
    "span_status",
    "start_time",
    "status_code",
    "status_message",
    "trace_id",
    "url_path",
    "url_scheme",
    "user_agent_original"
]
No reference_parent_span_id existed.
Since I add the pipeline, traces can be found now.
once the field is in the schema you can remove the pipeline
j
Oh, thank you! but i don't know why there is no add button on my UI even if i am admin user.