@eac-arch/infrastructure-telemetry
v1.0.6
Published
Angular telemetry library integrating OpenTelemetry tracing across routing, HTTP, and user interactions.
Readme
@eac-arch/infrastructure-telemetry
Angular telemetry library integrating OpenTelemetry tracing across routing, HTTP, and user interactions.
Purpose
@eac-arch/infrastructure-telemetry provides end-to-end client tracing with consistent parent/child span propagation:
- OpenTelemetry Web tracer provider setup
- route lifecycle tracing
- HTTP request/response tracing (with redaction controls)
- user interaction spans (click/navigation/input-driven flows)
Main Capabilities
provideTelemetry(): Registers OpenTelemetry setup and starts router/interaction tracing.telemetryHttpInterceptor: Creates client spans per request, injects W3C trace headers, captures request/response metadata, and redacts sensitive fields.RouterTracingService: Traces navigation phases and correlates downstream work.UserInteractionTracingService: Creates root UI interaction spans for clicks, keyboard selections, and field-driven navigation.CurrentSpanService: Stores active span references for cross-cutting correlation.- DI tracing helpers
:
createDiTraceProxy,provideTracedClass.
Public API
export { provideTelemetry };
export { telemetryHttpInterceptor };
export { CurrentSpanService };
export { UserInteractionTracingService };
export { createDiTraceProxy, provideTracedClass };Runtime Config
Read from ConfigService:
OTEL_COLLECTOR_ENDPOINTOTEL_SERVICE_NAMETELEMETRY.HTTP_CAPTURE_DETAILSTELEMETRY.HTTP_MAX_ATTRIBUTE_LENGTHTELEMETRY.HTTP_RESPONSE_BODY_MAX_LENGTH
Dependencies
@eac-arch/infrastructure-config@opentelemetry/*browser tracing packages- Angular core/common/router
tslib
Development
From eac-arch-infrastructure-telemetry:
npm install
npm run build
npm testCreated By
Erick Arostegui Cunza
Enterprise Solutions Architect
Professional Profile:
- LinkedIn: https://www.linkedin.com/in/erick-arostegui-cunza/
Articles:
- Medium: https://medium.com/@scorpius86
Channels and Media:
- Facebook: https://www.facebook.com/Erick.Arostegui.Cunza
- TikTok: https://www.tiktok.com/@erick_arostegui_cunza
- Instagram: https://www.instagram.com/erickarosteguicunza/
- Spotify: https://open.spotify.com/show/2JQxlxcRg7k7cJ1hB52Ge5
Created by Erick Arostegui Cunza.
