Skip to content

Conversation

@facostaembrace
Copy link

Which problem is this PR solving?

Short description of the changes

package.json Outdated
]
],
"dependencies": {
"react": "^18.0.0"
Copy link

Choose a reason for hiding this comment

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

should this one be added in the package folder instead? Is it more of a peer dependency as well?

Copy link
Author

@facostaembrace facostaembrace Jul 30, 2024

Choose a reason for hiding this comment

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

yep, good catch! probably it was me hitting npm install react in the wrong place. I will fix it, this file shouldn't have changes

Copy link
Author

Choose a reason for hiding this comment

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

fixed.

* happening just once, when the store is created
*/
if (!provider) {
console.info('No TracerProvider found. Using global tracer instead.');
Copy link

Choose a reason for hiding this comment

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

could make configurable like the other PR

Copy link
Author

Choose a reason for hiding this comment

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

are you talking about the console messages? if so, yes. to make it configurable it's under my plans. if you talk about the Provider, I think it's configured by the following couple of lines

Copy link

Choose a reason for hiding this comment

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

yep console messages

Copy link
Author

Choose a reason for hiding this comment

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

done.

// @ts-expect-error
const store = createStore(
rootReducer,
compose(applyMiddleware(otelLoggerMiddleware))
Copy link

Choose a reason for hiding this comment

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

so I think a test we could construct to confirm the behaviour when there's other middleware is:

  • add some artificial delay of 50ms or something to the redux action
  • confirm the span duration for the action is >= 50ms
  • apply other middleware before and after the OTEL one that do a noop
  • repeat the test and confirm the span still has that duration

@facostaembrace facostaembrace force-pushed the facosta/instrumentation-react-native-redux branch 2 times, most recently from 5d2a3ed to 073a192 Compare August 1, 2024 17:00
@facostaembrace facostaembrace changed the title feat(instrumentation-react-native-redux) Adding new instrumentation library to track changes during Redux operations feat(instrumentation-react-native-redux): Adding new instrumentation library to track changes during Redux operations Aug 1, 2024
@facostaembrace facostaembrace force-pushed the facosta/instrumentation-react-native-redux branch 3 times, most recently from f8e801c to 18ec2b0 Compare August 1, 2024 19:31
@facostaembrace facostaembrace force-pushed the facosta/instrumentation-react-native-redux branch 2 times, most recently from c16a316 to 77204f1 Compare August 6, 2024 13:05
@facostaembrace facostaembrace force-pushed the facosta/instrumentation-react-native-redux branch from 77204f1 to 836def0 Compare August 6, 2024 13:18
@facostaembrace facostaembrace marked this pull request as ready for review August 6, 2024 13:23
Copy link

@jpmunz jpmunz left a comment

Choose a reason for hiding this comment

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

changes look good to me, I think the only thing missing is a hook for custom attributes so that we can set emb.type from the Embrace SDK

@jpmunz jpmunz force-pushed the facosta/instrumentation-react-native-redux branch from 1f72858 to e2df6b0 Compare January 20, 2025 16:32
@jpmunz
Copy link

jpmunz commented Jan 20, 2025

@facostaembrace fyi I ran into package conflicts after getting the latest from main, I found it easiest to move forward by removing these dependencies which meant taking the react components out of the tests but I think they still exercise the same functionality:
e2df6b0

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