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

Ehsann/tracing merge main #1667

Closed
wants to merge 27 commits into from
Closed

Ehsann/tracing merge main #1667

wants to merge 27 commits into from

Conversation

ehsannas
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

ehsannas and others added 9 commits March 19, 2024 16:43
* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* Address code review feedback.
* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* feat: Add com.google.cloud.firestore.telemetry package.

* Address code review feedback.

* Factor out the otel version in pom.xml.
* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* feat: Add com.google.cloud.firestore.telemetry package.

* fix: Remove OpenCensus tracing code.
#1590)

* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* feat: Add com.google.cloud.firestore.telemetry package.

* fix: Remove OpenCensus tracing code.

* feat: tracing for aggregate queries, bulkwriter, partition queries, and listDocuments.

* Address code review feedback.

* Address feedback.

* don't use wildcard imports.
* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* feat: Add com.google.cloud.firestore.telemetry package.

* fix: Remove OpenCensus tracing code.

* feat: tracing for aggregate queries, bulkwriter, partition queries, and listDocuments.

* feat: trace instrumentation for DocumentReference methods.
* feat: Add FirestoreOpenTelemetryOptions to FirestoreOptions.

* feat: Add com.google.cloud.firestore.telemetry package.

* fix: Remove OpenCensus tracing code.

* feat: tracing for aggregate queries, bulkwriter, partition queries, and listDocuments.

* feat: trace instrumentation for DocumentReference methods.

* feat: trace instrumentation for queries and transactions.

* test: Adding first e2e client-tracing test w/ Custom Root Span (#1621)

* test: Adding first e2e client-tracing test w/ Custom Root Span

* Roll back E2E tests commit.

* Address feedback.

* Address feedback (better event log message).

* Address feedback.

---------

Co-authored-by: Jimit J Shah <57637300+jimit-j-shah@users.noreply.github.com>
…e Java Server SDK using OpenTelemetry SDK and Cloud Trace Exporter against Cloud Trace. (#1635)

* Adding first e2e client-tracing test w/ Custom Root Span

* test: Adding first e2e client-tracing test w/ Custom Root Span

* Fixing test dependencies and use default GCP testing project.

Fixing

* Fixing test dependencies and use default GCP testing project.

* Fixing formatting

* Add aggregationQueryGet Test

* Add bulkWriterCommitTrace Test

* Fixing running multiple-tests

* Add partitionQuery Test

* Add collectionListDocumentsTrace Test

* Add docRef*Trace Tests

* Add docRefUpdate*Trace and docRefDelete*Trace Tests

* Fixing Trace fetching using retries for missing or incomplete traces due to eventual consistency of Cloud Trace

* Add get/query Trace Tests

* Add Transaction test

* Added TraceContainer to be able to test transaction test-cases

* test: Adding Transaction tests

* test: Adding Transaction tests

* test: Adding TestParameterInjector to run the test for global and non-global opentelemetry SDK instances

* test: formatting and cleanup

* test: Adding first e2e client-tracing test w/ Custom Root Span

* test: Add aggregationQueryGet Test

* test: Add bulkWriterCommitTrace Test and fixed running multiple-tests

* test: Add partitionQuery Test

* test: Add collectionListDocumentsTrace Test

* test: Add docRefUpdate*Trace and docRefDelete*Trace Tests and fixed Trace fetching using retries for missing or incomplete traces due to eventual consistency of Cloud Trace

* test: Add get/query Trace Tests

* test: Added Transaction tests using TraceContainer to verify traces for Transaction ops (BeginTransaction, Rollback etc)

* test: Adding TestParameterInjector to run the test for global and non-global opentelemetry SDK instances

* test: Formatting and cleanup

* test: review comments

* test: fixing dfs to handle case where the compareTo callstack may be shorter than the trace callstack - don't need to throw an exception in that case

* test: Consolidating verification methods

* test: review comments
* fix: Rename 'enabled' to 'tracingEnabled'.

In the future, FirestoreOpenTelemetryOptions will support enabling/disabling
Logging and Metrics as well. So we should use a better name for this field.

* address feedback.
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: firestore Issues related to the googleapis/java-firestore API. labels Apr 30, 2024
@ehsannas ehsannas force-pushed the ehsann/tracing-merge-main branch 8 times, most recently from 56fffa9 to df3318b Compare May 1, 2024 02:23
@ehsannas ehsannas force-pushed the ehsann/tracing-merge-main branch 3 times, most recently from 4d3064d to 7c8e624 Compare May 1, 2024 22:16
@ehsannas ehsannas force-pushed the ehsann/tracing-merge-main branch from 7c8e624 to cc7e7cd Compare May 1, 2024 22:23
@ehsannas ehsannas force-pushed the ehsann/tracing-merge-main branch from 0912939 to d2a76b5 Compare May 3, 2024 06:47
@mpeddada1
Copy link
Contributor

@ehsannas Can we try adding the metadata config provided below to https://github.com/googleapis/java-firestore/blob/5bcbf88b1174d5e2615f66d9997be76481842131/google-cloud-firestore/src/test/resources/META-INF/native-image/reflect-config.json?

  {
    "name": "com.google.cloud.firestore.it.ITTracingTest$Pojo",
    "allDeclaredConstructors": true,
    "allPublicConstructors": true,
    "allDeclaredMethods": true,
    "allPublicMethods": true,
    "allDeclaredFields": true,
    "allPublicFields": true
  }

Verified locally with mvn clean test -Dtest=com.google.cloud.firestore.it.ITTracingTestGlobalOtel -Dsurefire.failIfNoSpecifiedTests=false -Pnative

@ehsannas
Copy link
Contributor Author

ehsannas commented May 3, 2024

yup, that fixed it! Thanks @mpeddada1

@ehsannas ehsannas closed this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants