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

Implementing metrics and user logs to Nu Data Lineage #23

Merged
merged 19 commits into from
Jan 22, 2025

Conversation

jonathanpmoraes
Copy link

@jonathanpmoraes jonathanpmoraes commented Jan 16, 2025

Implementing metrics and user logs to Nu Data Lineage

This pull request introduces several new dependencies and enhancements to the project, focusing on logging, monitoring, and user information handling. The key changes include adding prom-client for metrics collection, integrating loglevel for improved logging, and implementing a new API endpoint to log user information.

Dependency Additions:

  • Added prom-client dependency for metrics collection (package.json, web/package.json). [1] [2]
  • Added loglevel and its type definitions for enhanced logging capabilities (web/package-lock.json, web/package.json). [1] [2] [3] [4] [5] [6]

Monitoring Enhancements:

  • Integrated prom-client in web/setupProxy.js to collect default metrics and expose them via a /metrics endpoint. [1] [2]
  • Added uptime gauge metric to track application uptime.

Logging Enhancements:

  • Implemented a helper function to format datetime strings for logging purposes (web/setupProxy.js).
  • Added an API endpoint /api/loguserinfo to log user information in a structured format (web/setupProxy.js).
  • Updated LoginCallback component to send user information to the new logging endpoint upon successful authentication (web/src/components/LoginCallback.tsx).

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@jonathanpmoraes jonathanpmoraes merged commit 2afa2bb into main Jan 22, 2025
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.

4 participants