open-telemetry / open-telemetry/opentelemetry-python
Common JSON encoding
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
I propose a common package for json encoding like the protobuf encoding package opentelemetry-exporter-otlp-proto-common possibly call it opentelemetry-exporter-otlp-json-common
Describe the solution you'd like
Encoding should generate the json-protobuf-encoding
Describe alternatives you've considered
I have considered two alternatives:
- Encode using the
opentelemetry-exporter-otlp-proto-commonthen use MessageToDict to convert it to a Python dict, replacingtrace_idandspan_idwith the hex encoding - Completely new implementation serialising directly to a dict
I am currently liking option 2 more, mostly because you would not need Protobuf installed following the original motivation of allowing json encoding.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing opentelemetry-exporter-otlp-proto-common package and the OTLP JSON encoding specification linked in the issue. Compare the proposed direct-dict approach with MessageToDict and the referenced motivation; done means a common package can generate the specified JSON-protobuf encoding without requiring Protobuf.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100