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

Tryout otlp collector fix for retryable http errors #3515

Merged
merged 6 commits into from
Mar 27, 2024

Conversation

jesusvazquez
Copy link
Member

What this PR does:

Tries out a collector version that includes open-telemetry/opentelemetry-collector#9357 and adds two e2e tests to make sure that the receiver replies with retryable errors.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

@jesusvazquez
Copy link
Member Author

Waiting to see if the original PR can be merged upstream and then we just have to vendor the main collector repository instead of the fork.

require.NoError(t, err)
fmt.Println(string(bodyBytes))

assert.Equal(t, http.StatusTooManyRequests, resp.StatusCode)
Copy link
Contributor

Choose a reason for hiding this comment

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

Check my understanding, but we are sending multiple traces in one reqeust, and the config specifies a limit of one trace per user. Should this fail with "TooManyRequests" since we are only making one request?

Copy link
Member Author

Choose a reason for hiding this comment

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

The config limits fixture file used in this tests specifies the following https://github.com/mapno/tempo/blob/70bf4e253df931f68e747b267c496adaa8e77f6a/integration/e2e/config-limits.yaml#L20

overrides:
  defaults:
    ingestion:
      max_traces_per_user: 1
      rate_limit_bytes: 500
      burst_size_bytes: 500
    global:
      max_bytes_per_trace: 130

The test is batching up 10 traces
https://github.com/mapno/tempo/blob/5faf0f091584b25e43f57fdcb27e5f2da7cc342a/integration/e2e/limits_test.go#L146

So the quota is being hit and the status code returned is 429 which is known as Resource Exhausted but in go its also TooManyRequests https://github.com/golang/go/blob/master/src/net/http/status.go#L62

go.mod Outdated Show resolved Hide resolved
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
@jesusvazquez jesusvazquez force-pushed the jvp/otlp-http-500s-and-collector-fix branch from 661c3f3 to c1a61d9 Compare March 27, 2024 17:32
Copy link
Contributor

@zalegrala zalegrala left a comment

Choose a reason for hiding this comment

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

Nice, thanks for the contribution.

@zalegrala zalegrala merged commit 75baee4 into grafana:main Mar 27, 2024
13 of 14 checks passed
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.

4 participants