Skip to content

Add telemetry file access to TestContext#985

Draft
runesoerensen wants to merge 2 commits intomainfrom
allow-telemetry-file-access
Draft

Add telemetry file access to TestContext#985
runesoerensen wants to merge 2 commits intomainfrom
allow-telemetry-file-access

Conversation

@runesoerensen
Copy link
Copy Markdown
Contributor

When the libcnb trace feature is enabled, buildpacks output OpenTelemetry JSONL trace data to /tmp/libcnb-telemetry/ during builds. Previously, testing this telemetry required a workaround: a secondary bash buildpack (tracing-reader) that would cat the telemetry files to stdout during the build phase.

This draft PR explores an alternative approach to improve that: It mounts a temporary host directory to /tmp/libcnb-telemetry:rw via pack build --volume, reads the .jsonl files after the build completes, and exposes them through detect_telemetry() and build_telemetry() methods on TestContext.

Also see #983 for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant