OpenTelemetry

Using OpenTelemetry with HighByte Intelligence Hub

The HighByte Intelligence Hub supports running with the OpenTelemetry Java Agent out-of-the-box. Intelligence Hub metrics, logs, and JVM exporters are currently supported.

OpenTelemetry is enabled by setting the OTEL_COLLECTOR_ENDPOINT environment variable before starting the hub. You can also override or augment agent properties using OTEL_AGENT_PROPERTIES_EXTRA. Exported metrics and logs are automatically tagged with resource attributes identifying the host and instance they came from.

Environment VariableDescriptionExample Value
OTEL_COLLECTOR_ENDPOINTEnables the OpenTelemetry Java Agent and sets the collector endpointhttp://<collector-host>:4318
OTEL_AGENT_PROPERTIES_EXTRAOptional. Override or augment OTel properties passed to the Java Agent-Dotel.exporter.otlp.protocol=grpc

Once the variable is set, start the hub using the appropriate script for your platform.

Windows

.\start-windows.bat

Linux

./start-linux.sh

macOS

./start-macos.sh

Docker

Pass the environment variables using -e flags on the docker run command. Because there is no local collector running inside the container, a remote endpoint is required.

docker run -p 45245:45245 -p 1885:1885 -p 8885:8885 --name highbyte \
  --mount source=hb_vol,target=/usr/local/highbyte/appData \
  -e OTEL_COLLECTOR_ENDPOINT=http://<collector-host>:4318 \
  highbyte:X.X.X

Resource Attributes

All exported metrics and logs are tagged with OpenTelemetry resource attributes that identify where the telemetry originated. This is especially useful when running more than one Intelligence Hub instance (for example, in High Availability or Kubernetes), so you can tell which host or pod each metric came from.

The following attributes are added by default:

AttributeDescription
service.nameAlways HighByteIntelligenceHub.
service.instance.idUnique identifier for this instance. Uses HA_NODE_ID when running in High Availability mode, otherwise the hostname.
host.nameHost name, detected by the OpenTelemetry Java Agent.
host.idMachine identifier, detected by the OpenTelemetry Java Agent.
container.nameDefaults to the hostname. Set the CONTAINER_NAME environment variable to override.

Kubernetes Metadata

When running in Kubernetes, additional k8s.* attributes can be included by exposing the following environment variables to the container,typically via the Kubernetes Downward API . Each attribute is added only when its environment variable is set.

Environment VariableResource AttributeDownward API Field
K8S_NAMESPACE_NAMEk8s.namespace.namemetadata.namespace
K8S_POD_NAMEk8s.pod.namemetadata.name
K8S_POD_UIDk8s.pod.uidmetadata.uid
K8S_POD_IPk8s.pod.ipstatus.podIP
K8S_NODE_NAMEk8s.node.namespec.nodeName
K8S_CLUSTER_NAMEk8s.cluster.nameSet manually
K8S_CONTAINER_NAMEk8s.container.nameSet manually
K8S_DEPLOYMENT_NAMEk8s.deployment.nameSet manually (e.g. from a label)
K8S_STATEFULSET_NAMEk8s.statefulset.nameSet manually (e.g. from a label)
K8S_DAEMONSET_NAMEk8s.daemonset.nameSet manually (e.g. from a label)

Example pod spec wiring the Downward API:

env:
  - name: K8S_NAMESPACE_NAME
    valueFrom: { fieldRef: { fieldPath: metadata.namespace } }
  - name: K8S_POD_NAME
    valueFrom: { fieldRef: { fieldPath: metadata.name } }
  - name: K8S_POD_UID
    valueFrom: { fieldRef: { fieldPath: metadata.uid } }
  - name: K8S_POD_IP
    valueFrom: { fieldRef: { fieldPath: status.podIP } }
  - name: K8S_NODE_NAME
    valueFrom: { fieldRef: { fieldPath: spec.nodeName } }

Application Logs

All INFO, WARN, and ERROR event log messages are exported to OpenTelemetry. Logs are exported with the following attributes:

Attribute NameDescription
highbyte.hub.eventlog.sourceName of the component generating the event log message.
highbyte.hub.eventlog.typeCorresponding to the HighByte message type; INFO, WARN, and ERROR

Connection Metrics

The following metrics are exported for monitoring connections in HighByte Intelligence Hub:

Read Metrics

Metric NameTypeDescriptionAttributes
highbyte.hub.connection.stats.read.pending.sizeHistogramNumber of pending reads for a connection across all inputshighbyte.hub.connection.name
highbyte.hub.connection.stats.read.countCounterTotal number of reads executed for a connection’s inputhighbyte.hub.connection.name
highbyte.hub.connection.input.name
highbyte.hub.connection.stats.read.error.countCounterTotal number of read errors for a connection’s inputhighbyte.hub.connection.name
highbyte.hub.connection.input.name
highbyte.hub.connection.stats.read.durationHistogramRead duration for a connection’s input in secondshighbyte.hub.connection.name
highbyte.hub.connection.input.name

Write Metrics

Metric NameTypeDescriptionAttributes
highbyte.hub.connection.stats.write.pending.sizeHistogramNumber of pending writes for a connection across all outputshighbyte.hub.connection.name
highbyte.hub.connection.stats.write.dropped.countCounterNumber of dropped writes for a connection across all outputshighbyte.hub.connection.name
highbyte.hub.connection.stats.write.countCounterTotal number of writes for a connection’s outputhighbyte.hub.connection.name
highbyte.hub.connection.output.name
highbyte.hub.connection.stats.write.error.countCounterTotal number of write errors for a connection’s outputhighbyte.hub.connection.name
highbyte.hub.connection.output.name
highbyte.hub.connection.stats.write.durationHistogramWrite duration for a connection’s output in secondshighbyte.hub.connection.name
highbyte.hub.connection.output.name

Pipeline Metrics

The following metrics are exported for monitoring pipelines in HighByte Intelligence Hub:

Trigger Metrics

Metric NameTypeDescriptionAttributes
highbyte.hub.pipeline.stats.trigger.countCounterTotal number of triggers for a pipeline’s triggerpipeline.name
pipeline.trigger.name
highbyte.hub.pipeline.stats.trigger.error.countCounterTotal number of errors for a pipeline’s triggerpipeline.name
pipeline.trigger.name

Execution Metrics

Metric NameTypeDescriptionAttributes
highbyte.hub.pipeline.stats.run.countCounterTotal number of runs for a pipelinepipeline.name
highbyte.hub.pipeline.stats.write.pending.sizeHistogramNumber of queued writes for a pipelinepipeline.name
highbyte.hub.pipeline.stats.wait.durationHistogramWait duration for a pipeline in secondspipeline.name
highbyte.hub.pipeline.stats.execution.durationHistogramExecution duration for a pipeline in secondspipeline.name
highbyte.hub.pipeline.stats.error.countCounterTotal number of errors for a pipeline’s stagepipeline.name
pipeline.stage.name

See JVM Metrics for more information about JVM metrics generated by the Open Telemetry Java Agent.