Merged
Conversation
Owner
makomweb
commented
Apr 7, 2026
- let frontend propagate trace context via @makomweb/otel-sdk-react
- Remove local frontend/src/config/otel.ts (now in package) - Update frontend/src/main.tsx to import from package - Import setupOTelSDK and setupFetchInstrumentation from package - Call setupOTelSDK() for core OTEL infrastructure - Call setupFetchInstrumentation(BACKEND_API_URL) for fetch tracing - BACKEND_API_URL remains application-specific - Update frontend/src/config/env.ts to only export BACKEND_API_URL - OTEL_COLLECTOR_ADDRESS now comes from package - Add @makomweb/otel-sdk-react to package.json dependencies - Uses local directory reference for development - Can be updated to npm registry after publication Benefits: - Removes code duplication (shared across projects) - Centralizes OTEL SDK maintenance - Cleaner separation of concerns - Can now be shared as published npm package Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update frontend/src/main.tsx: - Pass explicit collectorAddress to setupOTelSDK() - Reads from window.OTEL_COLLECTOR_ADDRESS with fallback to localhost:4318 - Maintains backward compatibility with existing window setup This aligns with package API change to make configuration explicit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Changed from local file:../../otel-sdk-react to @makomweb/otel-sdk-react@0.1.1 from npmjs.com registry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3 +/- ##
============================================
+ Coverage 37.73% 37.80% +0.07%
+ Complexity 366 365 -1
============================================
Files 89 89
Lines 1023 1021 -2
============================================
Hits 386 386
+ Misses 637 635 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.