Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add oterror package and implementation in api/global #778

Merged
merged 13 commits into from
Jun 2, 2020

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented May 29, 2020

This is the start to a unified solution for #174. This will be followed by using the oterror.Handler in the trace and metric SDK, and any exporter that has an "OnError" functionality.

Adds

  • New go.opentelemetry.io/otel/api/oterror package.

    The oterror package provides unified error interactions in OpenTelemetry.
    This includes providing standardized errors common to OpenTelemetry (APIs,
    SDKs, and exporters). Additionally it provides an API for unified error
    handling in OpenTelemetry.

    The unified error handling interface is used for any error that
    OpenTelemetry component are not able to remediate on their own, instead
    handling them in a uniform and user-defined way.

    • Includes all exported errors in the api package.
    • New oterror.Handle interface to act as the unified error handler interface SDKs can accept.
  • New global implementation of the oterror.Handler interface.

Changes

  • Breaks up the singular global.go (and global_test.go) file into component parts.
  • Unifies existing exported errors in the api package to live in the new oterror package.

@MrAlias MrAlias added the pkg:API Related to an API package label May 29, 2020
@MrAlias MrAlias self-assigned this May 29, 2020
api/global/handler.go Outdated Show resolved Hide resolved
MrAlias and others added 5 commits June 1, 2020 09:12
Move delegate call outside of lock to avoid deadlock.
Old tests were masking the underlying function they were trying to test.
api/global/handler.go Outdated Show resolved Hide resolved
@MrAlias MrAlias merged commit d9b6d9c into open-telemetry:master Jun 2, 2020
@MrAlias MrAlias deleted the oterror branch June 2, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:API Related to an API package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants