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

Implementation for OTel Span API #906

Merged
merged 1 commit into from
May 30, 2024
Merged

Implementation for OTel Span API #906

merged 1 commit into from
May 30, 2024

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented May 30, 2024

Goal

Create EmbSpan, a wrapper implementation of the OTel Span API object that will call into EmbraceSpan in order to do span operations.

The current architecture is not ideal, as we have an Embrace OTel API implementation that wraps an Embrace Span API implementation that in turn wraps the official Java SDK Span API implementation. Ideally, all the Embrace-specific logic exists in Embrace OTel API implementation, and the Embrace Span API implementation just wraps around that. But that is a much bigger change, and will likely require refactoring the builder objects as well, so I just want to get this to work first before doing that heavy lifting.

Note: I did not implement the ability to add SpanLinks and a status description , as those are features that are not surfaced in the Embrace implementation. We can look to implement this in the future.

Testing

Unit test on EmbSpan to test the entire API surface.

Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.92%. Comparing base (e944cba) to head (4a3f045).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #906      +/-   ##
==========================================
+ Coverage   80.86%   80.92%   +0.05%     
==========================================
  Files         437      438       +1     
  Lines       11660    11689      +29     
  Branches     1784     1787       +3     
==========================================
+ Hits         9429     9459      +30     
+ Misses       1445     1443       -2     
- Partials      786      787       +1     
Files Coverage Δ
...droid/embracesdk/internal/spans/EmbraceSpanImpl.kt 86.99% <100.00%> (+1.74%) ⬆️
...io/embrace/android/embracesdk/spans/EmbraceSpan.kt 85.71% <ø> (ø)
...mbrace/android/embracesdk/opentelemetry/EmbSpan.kt 96.42% <96.42%> (ø)

... and 2 files with indirect coverage changes

Base automatically changed from hho/rename-embrace-span to master May 30, 2024 18:15
@bidetofevil bidetofevil merged commit 1316add into master May 30, 2024
4 checks passed
@bidetofevil bidetofevil deleted the hho/embspan branch May 30, 2024 21:33
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.

2 participants