OpenTelemetry Span JSON Generator
Produce an OpenTelemetry span as JSON with a 32-hex traceId and a 16-hex spanId from the crypto random source, or keep a valid traceId you paste in.
YAML
—
An OpenTelemetry span with valid identifiers
A span records one operation inside a distributed trace: it carries a name, an identifier of its own, the identifier of the trace it belongs to, a kind and an outcome. Chained by the same trace identifier, spans reconstruct a request's path across several services — which is the whole reason distributed instrumentation exists.
Fill in the name and, if you already have one, the trace identifier, and the page assembles the span as JSON. The sizes are not negotiable: the trace identifier is 16 bytes, or 32 hexadecimal digits, and the span identifier is 8 bytes, or 16 digits. An identifier of the wrong length is dropped by the collector, and an all-zero identifier is explicitly invalid in the specification.
The natural use is assembling an example to test a collector or an exporter configuration without instrumenting a whole application. Worth noting what a minimal span leaves out: the start and end timestamps, the attributes, the events and the parent span identifier — the last of which forms the tree. A span with no parent is the root of the trace.
Frequently asked questions
Can I reuse the same trace identifier?
How does the identifier travel between services?
What does the span kind mean?
Related Tools
JSON Validator
Validate JSON data to check for syntax errors. Detailed error report with line and position of the problem.
JSON Size Analyzer
Analyzes a JSON payload and shows how many bytes each key takes, sorted by weight, with percentage of total and the full path per node.
JSON ↔ CSV Converter
Convert data between JSON (array of objects) and CSV bidirectionally. Paste and convert instantly in the browser, no file upload needed.
package.json Generator
Build a minimal package.json: name, version, description, scripts, license, repository, type (module/commonjs). Everything in your browser.
i18n Translation File Diff
Compares two i18n JSON files and reports missing, extra and empty keys plus placeholder mismatches between the two locales.
SemVer Range Tester
Tests which versions satisfy a semver range (^1.2.3, ~2.0, >=1 <2) and explains the range as a lower and an upper bound.