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

Create a better default for queuedMaxSpans #266

Open
codefromthecrypt opened this issue Apr 13, 2024 · 0 comments
Open

Create a better default for queuedMaxSpans #266

codefromthecrypt opened this issue Apr 13, 2024 · 0 comments

Comments

@codefromthecrypt
Copy link
Member

Feature

Let's make queuedMaxSpans a function of messageMaxBytes, instead of an arbitrary default.

Rationale

This will better manage the queue backlog, allowing people to use a higher messageTimeout than 1s, but still clear the queue faster when under pressure.

Example Scenario

A small json span will reach the default 500,000 byte limit by about 1500 spans. A typical one will reach much sooner (typical e.g. sleuth/micrometer which adds more than one tag, and possibly a remote endpoint).

$ echo '{
  "traceId": "4d1e00c0db9010db86154a4ba6e91385",
  "parentId": "86154a4ba6e91385",
  "id": "4d1e00c0db9010db",
  "kind": "CLIENT",
  "name": "get",
  "timestamp": 1472470996199000,
  "duration": 207000,
  "localEndpoint": {
    "serviceName": "frontend",
    "ipv6": "1.2.3.4"
  },
  "tags": {
    "http.path": "/api",
  }
}' |wc -c
     327
$ bc -e '500000/327'
1529

Prior Art

@codefromthecrypt codefromthecrypt changed the title Create a sane default for queuedMaxSpans Create a better default for queuedMaxSpans Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant