-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
WIP - Add firebase integration #13954
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a first look. I think this PR is going into a good direction and I think - once we addressed the open todos - we should merge it in and build new features on top of it.
A couple of things I think are worth looking into in the future (i.e. not in this PR):
- should we patch
collection
? I'm not entirely sure what the function does but it returns the ref to the document collection so maybe it's interesting? - I'd like us to collect more information about the query. Would be great if we could somehow build a query from the individual
query
composition functions - I think it'd be worth to look into firebase auth and file storage but these could definitely come later.
packages/node/src/integrations/tracing/firebase/otel/patches/firestore.ts
Outdated
Show resolved
Hide resolved
packages/node/src/integrations/tracing/firebase/otel/patches/firestore.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E2E test passes locally for me. I'll get back to you on the environment variables in CI.
Had some minor comments/nits but once we get the tests working in CI, I think we're ready to merge.
dev-packages/e2e-tests/test-applications/firebase/tests/transactions.test.ts
Outdated
Show resolved
Hide resolved
dev-packages/e2e-tests/test-applications/firebase/tests/transactions.test.ts
Outdated
Show resolved
Hide resolved
expect(transactionEvent.spans![0]).toMatchObject(spanAddDoc); | ||
expect(transactionEvent.spans![1]).toMatchObject(spanSetDocs); | ||
expect(transactionEvent.spans![2]).toMatchObject(spanGetDocs); | ||
expect(transactionEvent.spans![3]).toMatchObject(spanDeleteDoc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it turns out that this assertion becomes flaky on CI I think it's perfectly reasonable for us to ensure that all the spans are in the spans
array but we don't need to rely on the specific order. We'll reconstruct the span tree in the UI anyway based on the parent/child relations and timestamps.
I think this might be flaky because I'm not sure if our Sentry<>Otel span serialization logic is order-preserving.
dev-packages/e2e-tests/test-applications/firebase/docker/firebase/firestore.rules
Outdated
Show resolved
Hide resolved
# Conflicts: # dev-packages/node-integration-tests/package.json # packages/node/src/index.ts # yarn.lock
deleteDoc, | ||
getDocs, | ||
setDoc, | ||
} from '@firebase/firestore'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we merge, let's make sure that this doesn't end up in the .d.ts
in any way.
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint
) & (yarn test
).