Skip to content

fix(velocity): start sampling and keep proxy gauges current - #7

Merged
TheMeinerLP merged 3 commits into
mainfrom
fix/velocity-sampling
Oct 30, 2026
Merged

TheMeinerLP merged 3 commits into
mainfrom
fix/velocity-sampling

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Owner

Description

Every Velocity proxy that loaded MinecraftOTEL logged an error during startup, and the proxy dashboards stayed flat. Players were online, but the proxy gauges kept the values from startup, all zero, for days. A proxy that started without backends never showed per-server data at all.

Sampling never actually ran on the proxy: Velocity refused to schedule it under the telemetry service, so only the single sample taken at startup reached the metrics. Sampling now starts under the plugin, so the values follow the proxy.

Two related problems showed up once sampling ran. A backend that was removed kept its last player count on the dashboards, and the registered-server count was not updated when the last backend went away. Per-server series now follow the backends that are currently registered, and the server count is reported on every sample while it is enabled, including 0.

Scope: Velocity only, Paper is unchanged. This also adds the first automated tests to the repository (JUnit, Mockito, OpenTelemetry SDK testing), test scope only.

Change proposal: openspec/changes/fix-velocity-sampling

Change Type

  • Bugfix
  • Feature
  • Refactor
  • Docs
  • Other

Tests

  • Not tested
  • Tested locally (details below)

Details: no live Velocity proxy was started for this change. Locally, ./gradlew test runs 7 unit tests and passes, and ./gradlew build succeeds. The scheduling test fails against the previous behaviour (IllegalArgumentException: plugin is not registered) and passes with the fix. The jar contains no test libraries.

Checklist

  • I ran existing tests or explained why not.
  • I updated relevant documentation.

@TheMeinerLP
TheMeinerLP merged commit b5b09b2 into main Oct 30, 2026
1 check passed
@TheMeinerLP
TheMeinerLP deleted the fix/velocity-sampling branch October 30, 2026 21:56
github-actions Bot pushed a commit that referenced this pull request Oct 30, 2026
## <small>1.6.1 (2026-10-30)</small>

* fix(velocity): start sampling and keep proxy gauges current (#7) ([b5b09b2](b5b09b2)), closes [#7](#7)
* docs: add community guidelines and security policy ([1d4f9fe](1d4f9fe))
* docs: update issue and pull request templates to use consistent English wording ([7063da7](7063da7))
* docs(openspec): propose fix-velocity-sampling (#6) ([8b3e5fc](8b3e5fc)), closes [#6](#6)
* chore(openspec): initialize openspec (#5) ([f2b6b52](f2b6b52)), closes [#5](#5)
* refactor: split platform samplers into separate implementations ([b21f436](b21f436))
* Merge branch 'main' of https://github.com/TheMeinerLP/MinecraftOTEL ([f15ad2b](f15ad2b))
* ci: add GitHub Actions workflow to publish Javadocs on release ([900eff5](900eff5))
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.

1 participant