Skip to content

Commit

Permalink
Merge pull request #67 from axoflow/opentelemetry-hostname
Browse files Browse the repository at this point in the history
[4.8] Adds set-hostname() to the opentelemetry parser
  • Loading branch information
fekete-robert authored Jul 15, 2024
2 parents 8eeb42c + 5605605 commit 9566ffd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions content/chapter-parsers/opentelemetry/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@ String, bool, int64, double, and bytes values are mapped to their respective {{%
The mapping of AnyValue type fields is limited.

`ArrayValue` and `KeyValueList` types are stored serialized with protobuf type. Note that `protobuf` and `bytes` types are only available, unless explicitly type cast. For example, `bytes(${.otel.log.span_id})`. When using template functions, use `--include-bytes`, for example, `$(format-json .otel.* --include-bytes`. In the case of `$(format-json)`, the content is base64-encoded into the bytes content.

## Options

## set-hostname()

| | |
| --------- | ---------------------------- |
| Synopsis: | `yes | no ` |
| Default: | `yes` |

Available in {{< product >}} 4.8 and later.

*Description:* If set to yes, the parser extracts the `host.name` resource attribute if available in the message. Otherwise, it leaves the [HOST](https://opentelemetry.io/docs/specs/semconv/attributes-registry/host/) field as-is.
4 changes: 4 additions & 0 deletions content/chapter-sources/opentelemetry/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ log otel_forward_mode_alts {

{{< include-headless "chunk/option-source-concurrent-requests.md" >}}

## keep-hostname()

The `opentelemetry()` source ignores this option and uses the address of the OTLP peer as the HOST.

{{% include-headless "chunk/option-source-log-fetch-limit.md" %}}

## `port()` {#port}
Expand Down
4 changes: 3 additions & 1 deletion content/chapter-sources/source-syslog-ng-otlp/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ The `syslog-ng-otlp()` source has the following options.

{{< include-headless "chunk/option-source-host-override.md" >}}

{{< include-headless "chunk/option-source-keep-hostname.md" >}}
## keep-hostname()

The `syslog-ng-otlp()` source ignores this option and uses the hostname from the message as the `${HOST}`.

{{< include-headless "chunk/option-source-keep-timestamp.md" >}}

Expand Down
1 change: 1 addition & 0 deletions content/whats-new/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This page is a changelog that collects the major changes and additions to this d
- You can send messages and metrics to [Elasticsearch data streams](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html) to store your log and metrics data as time series data using the [`elasticsearch-datastream()`]({{< relref "/chapter-destinations/elasticsearch-data-stream/_index.md" >}}) destination driver.
- You can use the [`server-side-encryption()`]({{< relref "/chapter-destinations/destination-s3/_index.md#server-side-encryption" >}}) and [`kms-key()`]({{< relref "/chapter-destinations/destination-s3/_index.md#kms-key" >}}) options to configure encryption for [Amazon S3 destinations]({{< relref "/chapter-destinations/destination-s3/_index.md" >}}).
- You can now set static gRPC headers in the [`bigquery()`]({{< relref "/chapter-destinations/google-bigquery/_index.md#headers" >}}), [`loki()`]({{< relref "/chapter-destinations/destination-loki/_index.md#headers" >}}), and the [`opentelemetry()`]({{< relref "/chapter-destinations/opentelemetry/_index.md#headers" >}}) destinations.
- The `opentelemetry()` parser has a new [`set-hostname()`]({{< relref "/chapter-parsers/opentelemetry/_index.md#set-hostname" >}}) option.

## Version 4.7 release (2024-04-18)

Expand Down

0 comments on commit 9566ffd

Please sign in to comment.