Object Initializer
Enrich TenXObjects with calculated fields for aggregation and regulation logic.
Modules
-
Group Initializer
Combine multi-line events into TenXObject group instances.
-
Level Classifier
Classify TenXObjects with a severity level.
-
Symbol Message Calculator
Enrich TenXObjects with logical message symbol sequence and origin values.
-
HTTP Status Code Extractor
Enrich TenXObjects with an extracted HTTP status code.
-
File Lookup
Enrich TenXObjects with lookup table values.
-
GeoIP Lookup
Geo-reference TenXObjects via their ipAddress value.
-
K8s Context Extractor
Enrich TenXObjects with k8s pod and container information.
Options
Specify the options below to configure the Object initializer:
| Name | Description |
|---|---|
| inputField | Fields whose value to search for symbol values |
| enrichmentFields | List of field to enrich TenXObjects with |
inputField
Fields whose value to search for symbol values.
| Type | Default |
|---|---|
| List | [log, message, body, text] |
specifies the names of the TenXObject fields to search for a for log event message/body in order of lookup priority.
For example, for the following event:
{"stream":"stdout","log":"Accounting service started","docker":{"container_id":"d47021a9963834cf89f32446c1de57e332b9c8391dc9faf42d47f1f7df8411bb"},"kubernetes":{"container_name":"accountingservice","namespace_name":"default","pod_name":"otel-accountingservice-76d9cfd496-hshv6","container_image":"ghcr.io/open-telemetry/demo:1.11.1-accountingservice","container_image_id":"ghcr.io/open-telemetry/demo@sha256:f09dfbd4adf590fcf94070cb832583c1e9572edd558b1c5761429a14d7bf4d9e","pod_id":"b41b9602-d4af-4ffd-a8e5-424541d91388","pod_ip":"192.168.12.183","host":"ip-192-168-27-8.ec2.internal","labels":{"app.kubernetes.io/component":"accountingservice","app.kubernetes.io/instance":"otel","app.kubernetes.io/name":"otel-accountingservice","opentelemetry.io/name":"otel-accountingservice","pod-template-hash":"76d9cfd496"}},"tenx_tag":"kubernetes.var.log.containers.otel-accountingservice-76d9cfd496-hshv6_default_accountingservice-d47021a9963834cf89f32446c1de57e332b9c8391dc9faf42d47f1f7df8411bb.log"}
if this value is empty, the symbolMessageField field is computed using the entirety of the event's content as:
In contrast, if this value is set to log, the symbolMessageField
is formatted solely from the value of that field, returning:
enrichmentFields
List of field to enrich TenXObjects with.
| Type | Default |
|---|---|
| List | [] |
Sets the default field names used to extract values for aggregating TenXObjects. Initializer modules automatically add their target fields to this setting.
Each initializer module appends its assigned field names to the global enrichmentFields.
Aggregators can use these values to group TenXObjects automatically, without needing explicit specification in their aggregatorFields.
In the example below an aggregator's fields are set to this value. The yield macro delays evaluation until all config files are loaded.
If no value has been set for this option, the aggregator defaults to grouping instances via a calculated 'sequence' field which captures their symbol identity.
aggregator:
- name: myAggregator
# 'fields' define intrinsic, extracted, or calculated fields whose combined values
# identify a unique row in the aggregator's in-memory table for each object.
# Uses enrichment fields from initializer modules by default.
fields:
- $=yield TenXEnv.get("enrichmentFields")
This module is defined in initialize/module.yaml.