agardnerIT / tracepusher

Generate and push OpenTelemetry Trace data to an OTEL collector in JSON format
Apache License 2.0
53 stars 11 forks source link

har-to-otel - error _blocked_queueing #92

Closed eravion closed 1 month ago

eravion commented 1 month ago

Hello,

Trying to load .har file to Jaeger with version 0.10.0

docker run   --mount type=bind,source="$(pwd)",target=/files   har-to-otel:latest   -f /files/web.har   -ep http://jaeger:4317   --insecure true
Traceback (most recent call last):
  File "/app/./har-to-otel.py", line 202, in <module>
    ui_time_dev_tools = round(loaded_item['time']) - round(loaded_item['timings']['_blocked_queueing'])
                                                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: '_blocked_queueing'

Same issue with the binary instead of the docker.

./har-to-otel -f web.har -ep http://jaeger:4317   --insecure true
Traceback (most recent call last):
  File "har-to-otel.py", line 202, in <module>
KeyError: '_blocked_queueing'
[3979008] Failed to execute script 'har-to-otel' due to unhandled exception!

Tested on Linux Debian 11.

The har file is ok on http://www.softwareishard.com/har/viewer/

web.har.zip

eravion commented 1 month ago

Same problem with

Traceback (most recent call last): File "/app/./har-to-otel.py", line 242, in span_attributes += f"response._transferSize={loaded_item['response']['_transferSize']} "


KeyError: '_transferSize'

Name of field is not standard?
http://www.softwareishard.com/blog/har-12-spec/
agardnerIT commented 1 month ago

Thanks, I'll take a look at this today.

agardnerIT commented 1 month ago

1) Tracepusher requires an HTTP(S) endpoint and from your port (4317), it looks like you're trying to use gRPC. That won't work. Please switch to :4318).

I believe this solves it: https://github.com/agardnerIT/tracepusher/commit/f6f520439c76cb9b9ba1cb4468ce3c15c6e3488e

New binaries in 0.11.0 release: https://github.com/agardnerIT/tracepusher/releases/tag/0.11.0

Properties starting with underscores are optional. It just so happens that every website + HAR I used to develop and test did actually add that field.

Please LMK how you go.

eravion commented 1 month ago

Hello,

Yes, it is better :)

Thks.

PS: I'll open a new case, I think the date is not well formated