截图
介绍
OpenTelemetry can be used to report various monitoring data (including metrics, logs and traces) and is a de-facto industry standard.
This mod provides additional instrumentation for the OpenTelemetry JavaAgent so that various game metrics can be reported. The overall functionality is similar to `fabric-exporter`.
Instrumented/Reported metrics
- MSPT/TPS
- Loaded chunks
- Server state
- Networking
- connections
- handshakes
- packets sent/received
- Chunk generation
- Entities
- grouped by type, spawn ground and world/dimension
- Players
- by world
- online
- total xp (score)
- xp level
- Runtime
- game version
- Fabric version
- Optional data from spark
Setup
- Make sure you have an endpoint where OpenTelemetry data can be ingested.
This could be a OpenTelemetry Collector hosted by you or by someone else (e.g. in the Grafana Cloud). - Setup the OpenTelemetry Java Agent so that it sends data to your ingestion service.
- Add the OpenTelemetry Agent Helper Extension for Fabric.
- This is required so that the OpenTelemetry Agent is correctly detecting and utilizing the mod.
- Simply add and (optionally) configure this mod. It should work out of the box.
- Import the provided dashboard into Grafana
- From Grafana Dashboards
- From the local demo in the repo
Diagram showcasing how the overall infrastructure can look
You may also have a look at the corresponding development setup as it contains an locally running deployment of the full infrastructure.
Dashboard look





Example integrations
- For `
itzg/minecraft-server` see here
Configuration
The configuration is dynamically loaded from (sorted by highest priority)
- Environment variables
- prefixed with `
OIE_` - all properties are in UPPERCASE and use
_instead of.or- - System properties
- prefixed with `
oie.` - A configuration file located in `
.config/oie.json`
Full list of configuration options
_Please note that the preconfigured values usually work out of the box.
_
_You should know exactly what you’re doing when doing modifications._
General
| Property | Type | Default | Notes |
| — | — | — | — |
| instrumentation-name | String | minecraft | Used as instrumentationScopeName. _A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null._ |
| strip-identifier-namespaces | bool | true | Removes namespaces from Identifier. Disabling this causes identifiers to look like this minecraft:overworld instead of overworld.
Usually only required for heavily modded servers. |
Metrics
| Property | Type | Default | Notes |
| — | — | — | — |
| metrics.freeze-when-server-paused | bool | true | Stop fetching certain metrics when the server is paused and uses previously cached values. This optimization usually improves the sampling speed for affected metrics by >10x.
Outcomes vary and depend on the work required for fetching and how often the server enters idle mode.
_If the server is not using pauseWhenEmptySeconds (set to <= 0) this optimization will be ignored._ |
| metrics.prefix | String | minecraft_ | Prefix for all metrics |
| metrics.counter-suffix | String | _total | Suffix for counters |
| metrics.enabled-only | List<String> | – | Only enables the specified metrics.
_ALL OTHER METRICS WILL BE DISABLED!_ |
| metrics.enabled-additionally | List<String> | – | Additionally enables the specified metrics.
_This is only relevant for metrics that are not enabled out of the box._ |
| metrics.disabled | List<String> | – | Disables the specified metrics |
| metrics.enable-player-details-samplers | bool | true | Determines if the PlayerDetailsSamplers (e.g. Online, TotalXP, XPLevel) are enabled |
常见问题
OpenTelemetry Instrumentation Extension 支持哪些 Minecraft 版本?
OpenTelemetry Instrumentation Extension 支持 Minecraft Java 版 1.21.4–26.3,共 13 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
OpenTelemetry Instrumentation Extension 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
litetex 的其他作品
查看全部 →Cape Provider
为你提供披风! 你可以从多种提供商中选择,也可以添加自己的提供商。
Rabbit Pathfinding Fixed
高效修复兔子的寻路问题
Raid Restorer
恢复 1.20 版本的袭击机制——让堆叠袭击农场重新可用
No Waypoints/Locator Bar
极简模组,可禁用路径点/定位栏。
评论
登录后评论和评分