Skip to content

Conversation

wsmoak
Copy link

@wsmoak wsmoak commented Oct 12, 2025

Adds some debug log output for successfully exporting metrics, and additional error logging. Implementation is borrowed from the Batch Log Record Processor.

Does not include a count. Eventually that can be handled with the otel.sdk.exporter.metric_data_point.exported internal metric. See https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/

Fixes: #1888

Copy link

linux-foundation-easycla bot commented Oct 12, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@wsmoak
Copy link
Author

wsmoak commented Oct 12, 2025

Tested locally, example log output:

D, [2025-10-12T12:51:41.996103 #84725] DEBUG -- : Successfully exported 1 log records
D, [2025-10-12T12:51:43.004206 #84725] DEBUG -- : Successfully exported 4 log records
D, [2025-10-12T12:51:48.115910 #84725] DEBUG -- : Successfully exported metrics

and with the otel collector shut down:

W, [2025-10-12T12:51:21.864191 #84645]  WARN -- : SystemCallError in MetricsExporter#send_bytes
E, [2025-10-12T12:51:21.864444 #84645] ERROR -- : OpenTelemetry error: Unable to export metrics
E, [2025-10-12T12:51:21.864550 #84645] ERROR -- : Result code: 1

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

Add logging about export status to Metrics

2 participants