-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: enable exporting logs via otel #249
base: main
Are you sure you want to change the base?
Conversation
sjvans
commented
Nov 6, 2024
•
edited
Loading
edited
// TODO: what to log? | ||
logger.emit({ | ||
severityNumber: SeverityNumber[severity], | ||
severityText: severity, | ||
body: log.msg, | ||
attributes: { 'log.type': 'LogRecord' } | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additional some semantic conventions from CPA come to mind... (hope it is ok to post SAP-internal references here in a comment, otherwise I remove them again :))
e.g. https://github.tools.sap/CPA/telemetry-semantic-conventions/blob/main/sap-extensions/logs/trace-correlation.md
or something from here? https://github.tools.sap/CPA/telemetry-semantic-conventions/blob/main/sap-extensions/resource/service.md
|
||
// intercept logs via format | ||
const { format } = cds.log | ||
cds.log.format = (module, level, ...args) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cds.log.format
needs to be overwritten on lifecycle event (probably served
)