Rename record_error to record_exception per spec#927
Merged
codeboten merged 4 commits intoopen-telemetry:masterfrom Jul 24, 2020
Merged
Rename record_error to record_exception per spec#927codeboten merged 4 commits intoopen-telemetry:masterfrom
codeboten merged 4 commits intoopen-telemetry:masterfrom
Conversation
The spec renamed record_error to record_exception. This change follows that change.
lzchen
reviewed
Jul 21, 2020
|
|
||
| def record_error(self, err: Exception) -> None: | ||
| """Records an error as a span event.""" | ||
| def record_exception(self, exception: Exception) -> None: |
Contributor
There was a problem hiding this comment.
Maybe for another PR, but is passing in the type, message and stack trace as parameters also valid for this method?
Contributor
Author
There was a problem hiding this comment.
Based on the spec, the recommendation was to have a convenience method to record exceptions (https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#record-exception).
This seemed more pythonic than passing in exception parameters, but i'm happy to add another PR if you feel strongly about it.
lzchen
approved these changes
Jul 21, 2020
ocelotl
approved these changes
Jul 22, 2020
srikanthccv
pushed a commit
to srikanthccv/opentelemetry-python
that referenced
this pull request
Nov 1, 2020
…pen-telemetry#930) * chore(metrics): move each aggregator in its own file * feat(aggregators): implement histogram aggregator open-telemetry#927 * chore: address PR comments * chore: fix ConsoleMetricExporter * chore: address mayur comments * chore: add documentation on internal structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The spec renamed record_error to record_exception. This change follows that change. See https://github.com/open-telemetry/opentelemetry-specification/blob/b8948d9cec3994e396898feca7a10025d08370db/specification/trace/api.md#record-exception