add span enter and exit #337
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request, workflow_dispatch] | |
name: CI | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Run basic example | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --example=basic test/test.c.instr.wasm "Test" | |
- name: Run many example | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --example=many test/test.c.instr.wasm "Test" | |
- name: Run OpenTelemetry STDOUT example | |
run: | | |
cargo run --example=otel-stdout test/nested.c.instr.wasm > test.json | |
cat test.json \ | |
| head -n 1 \ | |
| jq '.resourceSpans[].scopeSpans[].spans[0].attributes[0]' \ | |
| jq '.key == "function_name", .value.stringValue == "_start"' | |