Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make integration tests support checking more than one span of output #86

Open
tobert opened this issue Sep 20, 2021 · 1 comment
Open
Labels
bug Something isn't working testing tests and test infrastructure

Comments

@tobert
Copy link
Member

tobert commented Sep 20, 2021

The current "span_data" check in the test fixtures only supports one span. That's a result of the way I originally wrote it for one span then expanded to multiple and haven't used it much. In working with @edw-eqix on some test PRs we realized this.

I think the JSON would end up looking like:

[
  {
    "expect": {
      "output": "hello world\n",
      "spans": 2,
      "span_data": [
            {
              "trace_id": "edededededededededededededed9000",
              "span_id": "*",
              "is_sampled": "true"
            },
            {
              "trace_id": "*",
              "span_id": "*",
              "is_sampled": "true"
            }
      ]
    }
  }
]

So we have a list of spans to check instead of a single span hash.

A trick here is that technically spans can come into the server out of order. The simplest way forward for now is probably to call sort.Sort() on a CliEventList of spans. This will require a little refactoring and maybe extra work to make sure all spans are captured and passed back correctly.

@tobert tobert added bug Something isn't working testing tests and test infrastructure labels Sep 20, 2021
@tobert
Copy link
Member Author

tobert commented Jun 26, 2023

Added multiple span support to otel-cli status in #227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing tests and test infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant