Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.8] Adds set-hostname() to the opentelemetry parser #67

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions content/chapter-parsers/opentelemetry/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,17 @@ 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` attribute if available in the message. Otherwise, it leaves the [HOST](https://opentelemetry.io/docs/specs/semconv/attributes-registry/host/) field as-is.
fekete-robert marked this conversation as resolved.
Show resolved Hide resolved
If you're receiving messages using the [`syslog-ng-otlp()` source]({{< relref "/chapter-sources/source-syslog-ng-otlp/_index.md" >}}), the `opentelemetry()` parser will return the original hostname regardless of the where the message originated (OTLP, syslog, and so on).
fekete-robert marked this conversation as resolved.
Show resolved Hide resolved
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
Loading