open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.76k stars 614 forks source link

Update ReadableSpan.to_json indent argument type #3790

Open hennie-the-barbarian opened 6 months ago

hennie-the-barbarian commented 6 months ago

Description

Changed the type of the indent argument in ReadableSpan to match the type signature of json.dumps, since indent is simply being passed through to json.dumps

Fixes # N/A

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

TBD as it's a simple change

Does This PR Require a Contrib Repo Change?

No

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

Checklist:

linux-foundation-easycla[bot] commented 6 months ago

CLA Signed


The committers listed above are authorized under a signed CLA.

rbtz-openai commented 6 months ago

1) The current target python version is 3.8, you'll need to use Optional until we switch to something that supports https://peps.python.org/pep-0604/ 2) There are a lot of to_json functions around the codebase, which all currently share the same signature, which makes it "kind of" an interface, so I would say it should be a "none or all" type of a change.

I'm not a maintainer, so take it with a grain of salt.