-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
Provide new annotations or changes to annotation attributes to enable jgroups-opentelemetry to generate OTEL code directly from JGroups protocols.
Currently, jgroups-opentelemetry creates a parallel hierarchy to JGroups protocols and registers attributes programmatically.
We need to come up with and agree on a common translation between JGroups annotations (e.g. AttributeType.SCALAR -> Counter) and provide new annotations or annotation attributes in JGroups to accommodate jgroups-opentelemetry (e.g. Gauge?).
Observable
| jgroups-otel | JGroups |
|---|---|
| Observable | ManagedAttribute, Property |
| Observable.name | name |
| Observable.type -> ObservableType | type -> AttributeType |
| Observable.unit -> ObservableUnit | unit -> TimeUnit |
| Observable.description | description |
ObservableType
| jgroups-otel | JGroups | Comments |
|---|---|---|
| ObservableType.COUNTER | AttributeType.SCALAR | We can probably use UP_DOWN_COUNTER everywhere |
| ObservableType.UP_DOWN_COUNTER | AttributeType.SCALAR | |
| ObservableType.GAUGE | gauge=true | |
| ObservableType.HISTOGRAM | not used |
ObservableUnit
| ObservableUnit.UNITY | unit missing |
| ObservableUnit.NANOSECONDS | unit.NANOSECONDS |
| ObservableUnit.MILLISECONDS | unit.MILLISECONDS |
| ObservableUnit.SECONDS | unit.SECONDS |
| ObservableUnit.BYTES | type.BYTES |
| ObservableUnit.KILOBYTES | type.BYTES (compute kB) |
| ObservableUnit.MEGABYTES | type.BYTES (compute MB) |
ObservableScope
| ObservableScope.RUNTIME | ManagedAttribute |
| ObservableScope.CONFIGURATION | Property |
Make sure that fields annotated with Property and exposedAsManagedAttribute=false are not shown, as they might contain sensistive information, such as passwords etc.
Transformations
- Only ManagedAtributes are metrics, the Property annotation is configuration (not mapped?)
- All SCALAR / TIME / BYTES types -> COUNTER
- Example: bytes sent/received
- Can this be reset to 0?
- Add ManagedAttribute.gauge attribute to JGroups. Values that have no correlation to previous values, e.g. number of threads, average state size, total number of bytes in send-queue
- Maps to GAUGE (or UP_DOWN_COUNTER?)
- How do we map Average/AverageMinMax? HISTOGRAM ?
- Bytes are mapped to KB, MB etc. This can be computed dynamically
- Time is always milliseconds unless `unit` is present
- Average or AverageMinMax can be bytes- or time-based. This always implies gauge=true
Examples:
| JGroups attribute | jgroups-otel | Description |
|---|---|---|
| UDP.msg_stats.num_ucasts_sent (LongAdder), SCALAR | COUNTER | |
| UDP.msg_stats.num_mcast_bytes_sent (LongAdder), BYTES | COUNTER | |
| UFC.avg_time_blocked (double), TIME gauge=true | GAUGE | |
| UNICAST3.xmit_table_undelivered_messages (long), gauge=true | GAUGE |