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

SPIKE: Discovery - Feasibility of Prefixing Pino Logs to use .Alias if it is defined #858

Closed
2 tasks
cmwylie19 opened this issue Jun 5, 2024 · 2 comments · Fixed by #916
Closed
2 tasks
Assignees
Labels
Lula Needed for Lula integration into UDS Core

Comments

@cmwylie19
Copy link
Collaborator

cmwylie19 commented Jun 5, 2024

We need to verify that we are able to inject the name of the .Alias into logs of the callback function.

If it were possible it would need to be done with the Log object (import it into the mutate/validate/watch processor)

const Log = pino({
  transport,
  timestamp: pinoTimeFunction,
});

and import that into the mutate processor and set

set Log.prefix = the bindings alias before executing the callback

Checklist

  • Ensure npx pepr monitor is good
  • soak
@cmwylie19 cmwylie19 added the Lula Needed for Lula integration into UDS Core label Jun 5, 2024
@cmwylie19 cmwylie19 assigned cmwylie19 and schaeferka and unassigned cmwylie19 Jun 10, 2024
@cmwylie19 cmwylie19 changed the title Discovery - Feasibility of Prefixing Pino Logs to use .Alias if it is defined SPIKE: Discovery - Feasibility of Prefixing Pino Logs to use .Alias if it is defined Jun 10, 2024
@cmwylie19 cmwylie19 added this to the v0.33.0 milestone Jun 17, 2024
@schaeferka schaeferka linked a pull request Jun 26, 2024 that will close this issue
7 tasks
@cmwylie19 cmwylie19 removed this from the v0.32.4 milestone Jun 27, 2024
@cmwylie19
Copy link
Collaborator Author

This work is going really well and super happy with it. Going to move it to the v0.33.0 milestone where we will be adding and planning for more feature work and going to close out the v0.32.4 milestone today with a release 🎉

@cmwylie19 cmwylie19 modified the milestone: v0.33.0 Jun 27, 2024
@cmwylie19
Copy link
Collaborator Author

feasible. Kim has proven this.

cmwylie19 added a commit that referenced this issue Sep 24, 2024
## Description
We need to verify that we are able to inject the name of the .Alias into
logs of the callback function.

If it were possible it would need to be done with the Log object (import
it into the mutate/validate/watch processor)
```ts
const Log = pino({
  transport,
  timestamp: pinoTimeFunction,
});
```
and import that into the [mutate
processor](https://github.com/defenseunicorns/pepr/blob/0ec535efc6547f15fb4a02c35f6c3b8b4e5ecc22/src/lib/mutate-processor.ts#L80)
and set

set Log.prefix = the bindings alias before executing the callback

Checklist

- [x] Ensure `npx pepr monitor` is working and soak
- [ ] soak and verify with user base that feature is performing as
expected


## Related Issue

Fixes #858 
<!-- or -->
Relates to #676 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Co-authored-by: Case Wylie <cmwylie19@defenseunicorns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lula Needed for Lula integration into UDS Core
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants