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

feat!: update the otel hook to be spec compliant #179

Merged
merged 6 commits into from
Dec 21, 2022
Merged

Conversation

beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented Dec 9, 2022

Overview

🚨 This is a breaking change!🚨

The OpenTelemetry semantic convention specification now includes a section on feature flags. The hook no longer creates a new span but attaches a span event to an existing span.

It also changes the attribute names in the following ways:

  • flag_key => key
  • evaluated_variant => variant
  • evaluated_value is no longer used. A stringified version of the value is used if a variant is available.

This PR

  • Updates the OTel hook to be spec compliant.
  • Updates Jest tooling for the package
  • Updates the package readme

Related Issues

Fixes #171

Signed-off-by: Michael Beemer beeme1mr@users.noreply.github.com

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
@beeme1mr beeme1mr requested a review from toddbaert December 9, 2022 17:43
@toddbaert
Copy link
Member

Should we add an optional logger to the constructor? Since all hooks run in the SDK try/catch, we don't need to make sure it's safe, but it could help people in debugging.

@toddbaert toddbaert self-requested a review December 9, 2022 18:07
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Approved with comments, please especially consider: #179 (comment)

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
@beeme1mr beeme1mr merged commit 69b2163 into main Dec 21, 2022
@beeme1mr beeme1mr deleted the otel-spec-complient branch December 21, 2022 21:38
@github-actions github-actions bot mentioned this pull request Dec 21, 2022
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.

Add OTel hook
3 participants