Skip to content

Rename record_error to record_exception per spec#927

Merged
codeboten merged 4 commits intoopen-telemetry:masterfrom
codeboten:codeboten/record-exception
Jul 24, 2020
Merged

Rename record_error to record_exception per spec#927
codeboten merged 4 commits intoopen-telemetry:masterfrom
codeboten:codeboten/record-exception

Conversation

@codeboten
Copy link
Copy Markdown
Contributor

The spec renamed record_error to record_exception. This change follows that change.
@codeboten codeboten requested a review from a team July 20, 2020 21:32

def record_error(self, err: Exception) -> None:
"""Records an error as a span event."""
def record_exception(self, exception: Exception) -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for another PR, but is passing in the type, message and stack trace as parameters also valid for this method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codeboten codeboten merged commit 935280c into open-telemetry:master Jul 24, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants