Skip to content

Commit

Permalink
Merge pull request #18149 from ghalliday/issue31025
Browse files Browse the repository at this point in the history
HPCC-31025 Add support for multiple trace exporters

Reviewed-By: Rodrigo Pastrana <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Jan 9, 2024
2 parents 6c75870 + 87f5168 commit 6f2198d
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 182 deletions.
47 changes: 23 additions & 24 deletions helm/examples/tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,37 @@ All configuration options detailed here are part of the HPCC Systems Helm chart,
- 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.
- optAlwaysCreateTraceIds - If true components generate trace/span ids if none are provided by the remote caller.
- exporter - Defines The type of exporter in charge of forwarding span data to target back-end
- type - (default: JLOG) "OTLP-HTTP" | "OTLP-GRPC" | "OS" | "JLOG" | "NONE"
- JLOG
- logSpanDetails - Log span details such as description, status, kind
- logParentInfo - Log the span's parent info such as ParentSpanId, and TraceState
- logAttributes - Log the span's attributes
- logEvents - Log the span's events
- logLinks - Log the span's links
- logResources - Log the span's resources such as telemetry.sdk version, name, language
- OTLP-HTTP
- endpoint - (default localhost:4318) Specifies the target OTLP-HTTP backend
- timeOutSecs - (default 10secs)
- consoleDebug - (default false)
- OTLP-GRPC
- 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"
- enableDefaultLogExporter - If true, creates a trace exporter outputting to the log using the default options
- exporters: - Defines a list of exporters in charge of forwarding span data to target back-end
- type - "OTLP-HTTP" | "OTLP-GRPC" | "OS" | "JLOG"
- "JLOG"
- logSpanDetails - Log span details such as description, status, kind
- logParentInfo - Log the span's parent info such as ParentSpanId, and TraceState
- logAttributes - Log the span's attributes
- logEvents - Log the span's events
- logLinks - Log the span's links
- logResources - Log the span's resources such as telemetry.sdk version, name, language
- "OTLP-HTTP"
- endpoint - (default localhost:4318) Specifies the target OTLP-HTTP backend
- timeOutSecs - (default 10secs)
- consoleDebug - (default false)
- "OTLP-GRPC"
- 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
- batch:
- enabled - If true, trace data is processed in a batch, if false, trace data is processed immediately

### 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
exporters:
- type: OTLP-HTTP
consoleDebug: true
processor:
type: simple
```
### Sample configuration command

Expand Down
5 changes: 3 additions & 2 deletions helm/examples/tracing/jlog-collector-fulloutput.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
global:
tracing:
exporter:
type: JLog
enableDefaultLogExporter: false
exporters:
- type: JLOG
logSpanDetails: true
logParentInfo: true
logAttributes: true
Expand Down
4 changes: 2 additions & 2 deletions helm/examples/tracing/otlp-grpc-collector-default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global:
tracing:
exporter:
type: OTLP-GRPC
exporters:
- type: OTLP-GRPC
endpoint: "localhost:4317"
useSslCredentials: false
4 changes: 2 additions & 2 deletions helm/examples/tracing/otlp-http-collector-default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global:
tracing:
exporter:
type: OTLP-HTTP
exporters:
- type: OTLP-HTTP
endpoint: "localhost:4318"
consoleDebug: true
46 changes: 29 additions & 17 deletions helm/hpcc/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1116,29 +1116,41 @@
"type": "boolean",
"description": "If true, components generate trace/span ids if none are provided by the remote caller"
},
"exporter": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["OTLP-HTTP", "OTLP-GRPC", "OS", "JLOG", "NONE"],
"description": "The type of exporter in charge of forwarding span data to target back-end"
}
}
"enableDefaultLogExporter": {
"type": "boolean",
"description": "If true, creates a trace exporter outputting to the log using the default options"
},
"processor": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["batch", "simple"],
"description": "Defines the manner in which trace data is processed - in batches, or simple as available"
}
"exporters": {
"type": "array",
"description": "List of trace exporters",
"items": {
"$ref": "#/definitions/traceExporter"
}
}
},
"additionalProperties": { "type": ["integer", "string", "boolean"] }
},
"traceExporter": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["OTLP-HTTP", "OTLP-GRPC", "OS", "JLOG"],
"description": "The type of exporter in charge of forwarding span data to target back-end"
},
"batch": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "If true, trace data is processed in a batch, if false, trace data is processed immediately"
}
},
"additionalProperties": { "type": ["integer", "string", "boolean"] }
},
"additionalProperties": { "type": ["integer", "string", "boolean"] }
}
},
"compileOption": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 6f2198d

Please sign in to comment.