grafana / beyla

eBPF-based autoinstrumentation of web applications and network metrics
https://grafana.com/oss/beyla-ebpf/
Apache License 2.0
1.23k stars 78 forks source link

Oats testing in Beyla #322

Closed MattFrick closed 8 months ago

MattFrick commented 8 months ago

Basic hello-world smoke test. Example command line from test/oats:) sudo rm -rf build/testoutput/run && TESTCASE_BASE_PATH=/path/to/this/beyla/test/oats/yaml ginkgo -v -r

codecov-commenter commented 8 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (173401b) 81.05% compared to head (6e52ac2) 80.58%. Report is 10 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #322 +/- ## ========================================== - Coverage 81.05% 80.58% -0.48% ========================================== Files 42 45 +3 Lines 3553 3714 +161 ========================================== + Hits 2880 2993 +113 - Misses 499 536 +37 - Partials 174 185 +11 ``` | [Flag](https://app.codecov.io/gh/grafana/beyla/pull/322/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grafana) | Coverage Δ | | |---|---|---| | [integration-test](https://app.codecov.io/gh/grafana/beyla/pull/322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grafana) | `73.31% <ø> (-2.42%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/grafana/beyla/pull/322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grafana) | `49.62% <ø> (+1.09%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grafana#carryforward-flags-in-the-pull-request-comment) to find out more. [see 21 files with indirect coverage changes](https://app.codecov.io/gh/grafana/beyla/pull/322/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grafana)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MattFrick commented 8 months ago

This is the basic test setup, to which I'll be adding new tests in other PRs.

fstab commented 8 months ago

This is the basic test setup, to which I'll be adding new tests in other PRs.

I tried to have a look, but I'm lacking context on the scope of this PR. Please provide more info on what it does. The test runs the TraceQL query

{ .http.method = "GET" }

so is this a basic test for HTTP server spans rather than SQL client spans?

MattFrick commented 8 months ago

To avoid having a mega PR that includes multiple topics, I'm including the following here that is strictly oats without any sql stuff:

MattFrick commented 8 months ago

Closing: content of this PR is now inside the SQL PR: https://github.com/grafana/beyla/pull/298

grcevski commented 8 months ago

Closing: content of this PR is now inside the SQL PR: #298

I just reopened because having two separate PRs is much easier to review and follow. I hope you don't mind. Let's merge this PR first, the test here seems unrelated to SQL.

MattFrick commented 8 months ago

I've added "make oats-test" and "make oats-test-debug", which leaves the services running (for ~1h), so that they can be manually inspected, e.g. prometheus and grafana. Maybe some day we can figure out how to conditionally include docker-compose files in oats tests so that we don't have the overhead of things we don't always need when we're not debugging.