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

feat: enable exporting logs via otel #249

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

feat: enable exporting logs via otel #249

wants to merge 8 commits into from

Conversation

sjvans
Copy link
Contributor

@sjvans sjvans commented Nov 6, 2024

Screenshot 2024-11-06 at 12 17 59

Comment on lines +88 to +94
// TODO: what to log?
logger.emit({
severityNumber: SeverityNumber[severity],
severityText: severity,
body: log.msg,
attributes: { 'log.type': 'LogRecord' }
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@thsandfuchs thsandfuchs Jan 22, 2025

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) => {
Copy link
Contributor Author

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)

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.

2 participants