Skip to content

OTel SDK#3

Merged
makomweb merged 7 commits intomasterfrom
martin/otel
Apr 8, 2026
Merged

OTel SDK#3
makomweb merged 7 commits intomasterfrom
martin/otel

Conversation

@makomweb
Copy link
Copy Markdown
Owner

@makomweb makomweb commented Apr 7, 2026

  • let frontend propagate trace context via @makomweb/otel-sdk-react

makomweb and others added 6 commits April 7, 2026 09:07
- 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
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.80%. Comparing base (c3f4762) to head (6c588da).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
backend/src/Async/EventPersisted.php 0.00% 11 Missing ⚠️
backend/src/Async/EventPersistedHandler.php 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@makomweb makomweb merged commit 10d476a into master Apr 8, 2026
3 of 4 checks passed
@makomweb makomweb deleted the martin/otel branch April 8, 2026 12:41
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