Chrome DevTools HAR File to OpenTelemetry Converter
This tool converts a .har
file to OpenTelemetry traces and sends them to an OpenTelemetry collector using tracepusher.
Download this tool from the tracepusher releases assets on GitHub.
Prerequisites
This tool requires either:
- A copy of the
tracepusher
binary >=v0.10.0
in thePATH
- A copy of tracepusher.py ( >=
v0.10.0
) in the same directory ashar-to-otel
If you can run ./tracepusher version
and get a version >= 0.10.0
, you're good to proceed.
Usage
./har-to-otel -f /path-to-file/YOUR-HAR-FILE.har -ep http://otel-collector-url:4318 --insecure true
Optional flags
If set, these are added as span attributes:
--timings [true|false]
(defaults totrue
)--request-headers [true|false]
(defaults tofalse
)--response-headers [true|false]
(defaults tofalse
)--request-cookies [true|false]
(defaults tofalse
)--response-cookies [true|false]
(defaults tofalse
)--debug [true|false]
(defaults tofalse
)--dry-run [true|false]
(defaults tofalse
)--version
(prints thehar-to-otel
version)