-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-30795 Extends Jtrace exporter and configuration support
- Adds Otel dependancy - Exposes otlp-http exporter configuration - Defines jtrace processor and exporter config syntax - Adds support for OTLP HTTP/GRCP support - Adds helm/tracing/readme documentation - Adds sample values block for otlp exporters - Adds ca cert path support Signed-off-by: Rodrigo Pastrana <[email protected]>
- Loading branch information
Showing
6 changed files
with
173 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# HPCC Component Instrumentation and Tracing | ||
|
||
The HPCC Platform is instrumented to optionally track distributed work actions (Traces) and their various sub-task (spans) via Open Telemetry tooling. Traces and spans track information vital information which can be reported to services which specialize in processing and visualization of standardized trace/span information for the purpose or monitoring and observability of the health of individual requests processed by the platform. | ||
|
||
Tracing of HPCC components is enabled by default, and can be configured to fit the needs of the given deployment. | ||
|
||
## Configuration | ||
All configuration options detailed here are part of the HPCC Systems Helm chart, and apply at the global or component level. | ||
|
||
### Tracing cofiguration options | ||
- disabled - (default: false) disables tracking and reporting of internal traces and spans | ||
- alwaysCreateGlobalIds - If true, assign newly created global ID to any requests that do not supply one. | ||
- exporter - Defines The type of exporter in charge of forwarding span data to target back-end | ||
- type - (defalt: NONE) "OTLP-HTTP" | "OTLP-GRCP" | "OS" | "NONE" | ||
- OTLP-HTTP | ||
- endpoint - (default localhost:4318) Specifies the target OTLP-HTTP backend | ||
- timeOutSecs - (default 10secs) | ||
- consoleDebug - (default false) | ||
- OTLP-GRCP | ||
- endpoint: (default localhost:4317) The endpoint to export to. By default the OpenTelemetry Collector's default endpoint. | ||
- useSslCredentials - By default when false, uses grpc::InsecureChannelCredentials; If true uses sslCredentialsCACertPath | ||
- sslCredentialsCACertPath - Path to .pem file to be used for SSL encryption. | ||
- timeOutSeconds - (default 10secs) Timeout for grpc deadline | ||
- processor - Controls span processing style. One by one as available, or in batches. | ||
- type - (default: simple) "simple" | "batch" | ||
|
||
### Sample configuration | ||
Below is a sample helm values block directing the HPCC tracing framework to process span information serially, and export the data over OTLP/HTTP protocol to localhost:4318 and output export debug information to console: | ||
|
||
```console | ||
global: | ||
tracing: | ||
exporter: | ||
type: OTLP-HTTP | ||
consoleDebug: true | ||
processor: | ||
type: simple | ||
``` | ||
### Sample configuration command | ||
|
||
Sample helm command deploying an HPCC chart named myTracedHPCC using the hpcc helm repo and providing a the above tracing configuration. | ||
|
||
```console | ||
helm install myTracedHPCC hpcc/hpcc -f otlp-http-collector-default.yaml | ||
``` | ||
## Tracing information | ||
HPCC tracing information includes data needed to trace requests as they traverse over distributed components, and detailed information pertaining to important request subtasks in the form of span information. Each trace and all its related spans are assigned unique IDs which follow the Open Telemetry standard. | ||
|
||
The start and end of spans are reported to HPCC component logs regardless of any exporter related configuration. | ||
|
||
Sample span reported as log event: | ||
```console | ||
000000A3 MON EVT 2023-10-10 22:12:23.827 24212 25115 Span start: {"Type":"Server","Name":"propagatedServerSpan","GlobalID":"IncomingUGID","CallerID":"IncomingCID","LocalID":"JDbF4xnv7LSWDV4Eug1SpJ","TraceID":"beca49ca8f3138a2842e5cf21402bfff","SpanID":"4b960b3e4647da3f"} | ||
|
||
000000FF MON EVT 2023-10-10 22:12:24.927 24212 25115 Span end: {"Type":"Server","Name":"propagatedServerSpan","GlobalID":"IncomingUGID","CallerID":"IncomingCID","LocalID":"JDbF4xnv7LSWDV4Eug1SpJ","TraceID":"beca49ca8f3138a2842e5cf21402bfff","SpanID":"4b960b3e4647da3f"} | ||
``` | ||
|
||
Each log statement denotes the time of the tracing event (start or stop), the span type, name, trace and span id, and any HPCC specific attribute such as legacy GlobalID (if any), HPCC CallerID (if any), LocalID (if any). | ||
|
||
Spans exported via exporters will contain more detailed information such as explicit start time, duration, and any other attribute assigned to the span by the component instrumentation. | ||
|
||
Sample exported span data: | ||
```json | ||
{ | ||
"Name":"propagatedServerSpan", | ||
"TraceId":"beca49ca8f3138a2842e5cf21402bfff", | ||
"SpanId":"6225221529c24252", | ||
"kind":"Server", | ||
"ParentSpanId":"4b960b3e4647da3f", | ||
"Start":1696983526105561763, | ||
"Duration":1056403, | ||
"Description":"", | ||
"Status":"Unset", | ||
"TraceState":"hpcc=4b960b3e4647da3f", | ||
"Attributes":{ | ||
"hpcc.callerid":"IncomingCID", | ||
"hpcc.globalid":"IncomingUGID" | ||
}, | ||
"Events":{ | ||
}, | ||
"Links":{ | ||
}, | ||
"Resources":{ | ||
"service.name":"unknown_service", | ||
"telemetry.sdk.version":"1.9.1", | ||
"telemetry.sdk.name":"opentelemetry", | ||
"telemetry.sdk.language":"cpp" | ||
}, | ||
"InstrumentedLibrary":"esp" | ||
|
||
} | ||
``` | ||
|
||
## Directory Contents | ||
|
||
- 'otlp-http-collector-default.yaml' - Sample tracing configuration targeting OTLP/HTTP trace collector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
tracing: | ||
exporter: | ||
type: OTLP-GRCP | ||
endpoint: "localhost:4317" | ||
useSslCredentials: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
tracing: | ||
exporter: | ||
type: OTLP-HTTP | ||
endpoint: "localhost:4318" | ||
consoleDebug: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters