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

EMBR-4229 integration tests for using the otel navigation library #158

Open
wants to merge 2 commits into
base: feature-react-native-tracer-provider
Choose a base branch
from

Conversation

jpmunz
Copy link
Contributor

@jpmunz jpmunz commented Sep 27, 2024

Adding integration tests for using the otel navigation instrumentation library with our tracer provider.

Follow-ups outside of this PR:

@jpmunz jpmunz requested a review from a team as a code owner September 27, 2024 21:52
setError(
"The Embrace SDK must be started to use the TracerProvider, please invoke `initialize` from `@embrace-io/react-native`.",
);
setIsError(true);
} else if (!tracerProvider) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@facostaembrace I couldn't reproduce seeing the view span recorded twice after making this change so I'll assume for now it was due to accidentally instantiating this provider multiple times

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.36%. Comparing base (788536a) to head (3bbc96a).

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                            @@
##           feature-react-native-tracer-provider     #158      +/-   ##
========================================================================
+ Coverage                                 80.33%   80.36%   +0.02%     
========================================================================
  Files                                        36       36              
  Lines                                      1536     1538       +2     
  Branches                                    140      142       +2     
========================================================================
+ Hits                                       1234     1236       +2     
  Misses                                      301      301              
  Partials                                      1        1              
Files with missing lines Coverage Δ
...tracer-provider/src/EmbraceNativeTracerProvider.ts 100.00% <100.00%> (ø)

} from "../helpers/span";

describe("Navigation", () => {
it("should record the initially rendered screen", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@facostaembrace I was seeing this passing on both Android and iOS which I believe addresses the concern of not capturing the first render, unless there is another test you think could be added?

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.

1 participant