open-telemetry / open-telemetry/opentelemetry-python
make record_exception api consistent
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
Is your feature request related to a problem?
Each language api has a different function signature for record_exception.
The common base is having exception and attributes as function parameters. Java and Ruby have only these two which I do believe is the right version.
In Python however, we have additional parameters: timestamp and escaped. Now, escaped appears nowhere in the documentation. The timestamp parameter is more debatable but for the sake of consistency, I would argue in favor of deleting it as well.
Describe the solution you'd like
Remove timestamp and escaped from the record_exception function signature. If it accepted, I would like to do the same in the javascript api.
Describe alternatives you've considered
No response
Additional Context
No response
Would you like to implement a fix?
Yes
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
Start by locating the Python record_exception entry point and its tests, then inspect how timestamp and escaped are documented or used. Update the signature to retain only exception and attributes, adjust affected tests or documentation, and confirm the Python API tests pass with the consistent signature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100