Skip to content

Conversation

@herin049
Copy link
Contributor

@herin049 herin049 commented Dec 8, 2025

Fixes issue #2054 where platform.* telemetry API event types (except part of platform.report) do not get exported for logging. The implemented solution captures all logs by default, and simplifies the current implementation by reusing the core log record construction logic while reducing code duplication.

I have setup a toy lambda function to export logs to Grafana Cloud with the changes in this PR, here are the updated logs:
Screenshot From 2025-12-08 18-31-52

@herin049 herin049 requested a review from a team as a code owner December 8, 2025 00:19
@herin049 herin049 force-pushed the fix/report-platform-logs branch from 296c7f2 to 0c0e36a Compare December 8, 2025 20:35
@herin049 herin049 changed the title [WIP] initial changes to export telemetry api logs [Enhancement]: Add support for exporting telemetry API 'platform.*' log events Dec 8, 2025
@herin049 herin049 changed the title [Enhancement]: Add support for exporting telemetry API 'platform.*' log events feat: Add support for exporting telemetry API 'platform.*' log events Dec 9, 2025
@wpessers wpessers added enhancement New feature or request go Pull requests that update Go code bug Something isn't working and removed enhancement New feature or request labels Dec 13, 2025
@wpessers
Copy link
Contributor

@herin049 I see your solution captures all the logs by default. Does it also fix the issue, so can you exclude the extension logs and only get function and platform logs like was the reason for the original issue?

@herin049
Copy link
Contributor Author

herin049 commented Dec 17, 2025

@herin049 I see your solution captures all the logs by default. Does it also fix the issue, so can you exclude the extension logs and only get function and platform logs like was the reason for the original issue?

Yes, I can verify again by manually deploying the layer into my AWS account. The original issue is worded a bit weirdly, the original issue is that platform logs are not generated. The creator of the issue was trying to exclude extension and include platform and function but was only getting function logs (he was receiving no extension logs as expected, but also wasn't getting the platform logs).

The determining factor if you receive these logs or not if whether you add platform/extension/function to the event list which is passed to the Lambda TelemetryAPI during the initial subscription call. If you don't include one of these, then you'll get none of those events.

@wpessers wpessers added enhancement New feature or request and removed bug Something isn't working labels Dec 17, 2025
Copy link
Contributor

@wpessers wpessers left a comment

Choose a reason for hiding this comment

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

Some minor remarks regarding implementation to check out. Other than that, overall idea and approach looks good! 🚀

Copy link
Contributor

@wpessers wpessers left a comment

Choose a reason for hiding this comment

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

Just some final thoughts / questions. Lmk what you think.

@herin049 herin049 force-pushed the fix/report-platform-logs branch from e1fb692 to 0364b37 Compare December 18, 2025 18:34
@herin049
Copy link
Contributor Author

@wpessers Updated all float64 conversions to explicitly check the ok result instead of checking for a non-zero return value. Also updated the format string to use %.0f instead of casting to an int.

@herin049 herin049 requested a review from wpessers December 18, 2025 18:36
@wpessers
Copy link
Contributor

Thanks again for the work! Nice one! 🚀

@wpessers wpessers merged commit 119630e into open-telemetry:main Dec 18, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants