opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

make record_exception api consistent

Open dubloom opened this issue 10 months ago • 1 comments

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

dubloom avatar Apr 10 '25 15:04 dubloom

Might not be applicable due to: https://github.com/open-telemetry/opentelemetry-python/issues/4561

lzchen avatar Apr 24 '25 17:04 lzchen