open-telemetry / open-telemetry/opentelemetry-python

Common JSON encoding

Open
#3,283 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
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:

  1. Encode using the opentelemetry-exporter-otlp-proto-common then use MessageToDict to convert it to a Python dict, replacing trace_id and span_id with the hex encoding
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.