Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-snowflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Dasomeone authored Jun 13, 2024
2 parents 4ac49f6 + e152752 commit dd40e2b
Show file tree
Hide file tree
Showing 58 changed files with 513 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d
with:
image-ref: 'grafana/agent:main'
format: 'template'
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Features

- A new `otelcol.exporter.debug` component for printing OTel telemetry from
other `otelcol` components to the console. (@BarunKGP)

v0.41.1 (2024-06-07)
--------------------

### Breaking changes

- Applied OpenTelemetry [CVE-2024-36129](https://github.com/open-telemetry/opentelemetry-collector/security/advisories/GHSA-c74f-6mfw-mm4v) fixes. (@mattdurham)
- Components `otelcol.receiver.otlp`,`otelcol.receiver.zipkin` and `otelcol.receiver.jaeger` setting `max_request_body_size`
default changed from unlimited size to `20MiB`.

### Enhancements

- Updated pyroscope to v0.4.6 introducing `symbols_map_size` and `pid_map_size` configuration. (@simonswine)


v0.41.0 (2024-05-31)
--------------------

### Breaking changes

- The default listen port for `otelcol.receiver.opencensus` has changed from
Expand Down Expand Up @@ -38,6 +60,8 @@ Main (unreleased)

- Added support for `otelcol` configuration conversion in `grafana-agent convert` and `grafana-agent run` commands. (@rfratto, @erikbaranowski, @tpaschalis, @hainenber)

- Prefix Faro measurement values with `value_` to align with the latest Faro cloud receiver updates. (@codecapitano)

- Added support for `static` configuration conversion of the `traces` subsystem. (@erikbaranowski, @wildum)

- Add automatic conversion for `legacy_positions_file` in component `loki.source.file`. (@mattdurham)
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/release/8-update-helm-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Our Helm charts require some version updates as well.

4. Create a branch from `main` for [grafana/agent](https://github.com/grafana/agent).

5. Update the helm chart code in `$agentRepo/operations/helm`:
5. Update the helm chart code in `operations/helm/charts/grafana-agent`:

1. Update `Chart.yaml` with the new helm version and app version.
2. Update `CHANGELOG.md` with a new section for the helm version.
Expand Down
84 changes: 63 additions & 21 deletions docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
#
# ## 8.0.0 (2024-05-28)
#
# ### Changed
#
# - Add environment variable `OUTPUT_FORMAT` to control the output of commands.
#
# The default value is `human` and means the output format is human readable.
# The value `json` is also supported and outputs JSON.
#
# Note that the `json` format isn't supported by `make docs`, only `make doc-validator` and `make vale`.
#
# ## 7.0.0 (2024-05-03)
#
# ### Changed
Expand Down Expand Up @@ -255,6 +266,8 @@ readonly HUGO_REFLINKSERRORLEVEL="${HUGO_REFLINKSERRORLEVEL:-WARNING}"
readonly VALE_MINALERTLEVEL="${VALE_MINALERTLEVEL:-error}"
readonly WEBSITE_EXEC="${WEBSITE_EXEC:-make server-docs}"

readonly OUTPUT_FORMAT="${OUTPUT_FORMAT:-human}"

PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)"

if ! command -v curl >/dev/null 2>&1; then
Expand Down Expand Up @@ -748,45 +761,74 @@ POSIX_HERESTRING

case "${image}" in
'grafana/doc-validator')
if ! command -v jq >/dev/null 2>&1; then
errr '`jq` must be installed for the `doc-validator` target to work.'
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'

exit 1
fi

proj="$(new_proj "$1")"
printf '\r\n'
"${PODMAN}" run \

IFS='' read -r cmd <<EOF
${PODMAN} run \
--init \
--interactive \
--platform linux/amd64 \
--rm \
--tty \
${volumes} \
"${DOCS_IMAGE}" \
"--include=${DOC_VALIDATOR_INCLUDE}" \
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
"/hugo/content$(proj_canonical "${proj}")" \
"$(proj_canonical "${proj}")" \
| sed "s#$(proj_dst "${proj}")#sources#" \
| jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end'
${DOCS_IMAGE} \
--include=${DOC_VALIDATOR_INCLUDE} \
--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS} \
/hugo/content$(proj_canonical "${proj}") \
"$(proj_canonical "${proj}") \
| sed "s#$(proj_dst "${proj}")#sources#"
EOF

case "${OUTPUT_FORMAT}" in
human)
if ! command -v jq >/dev/null 2>&1; then
errr '`jq` must be installed for the `doc-validator` target to work.'
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'

exit 1
fi

${cmd} \
| jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end'
;;
json)
${cmd}
;;
*) # default
errr "Invalid output format '${OUTPUT_FORMAT}'"
esac
;;
'grafana/vale')
proj="$(new_proj "$1")"
printf '\r\n'
"${PODMAN}" run \
IFS='' read -r cmd <<EOF
${PODMAN} run \
--init \
--interactive \
--rm \
--workdir /etc/vale \
--tty \
${volumes} \
"${DOCS_IMAGE}" \
"--minAlertLevel=${VALE_MINALERTLEVEL}" \
'--glob=*.md' \
--output=/etc/vale/rdjsonl.tmpl \
/hugo/content/docs | sed "s#$(proj_dst "${proj}")#sources#"
${DOCS_IMAGE} \
--minAlertLevel=${VALE_MINALERTLEVEL} \
--glob=*.md \
/hugo/content/docs
EOF

case "${OUTPUT_FORMAT}" in
human)
${cmd} --output=line \
| sed "s#$(proj_dst "${proj}")#sources#"
;;
json)
${cmd} --output=/etc/vale/rdjsonl.tmpl \
| sed "s#$(proj_dst "${proj}")#sources#"
;;
*)
errr "Invalid output format '${OUTPUT_FORMAT}'"
esac

;;
*)
tempfile="$(mktemp -t make-docs.XXX)"
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: Grafana Agent
description: Grafana Agent is a flexible, performant, vendor-neutral, telemetry collector
weight: 350
cascade:
AGENT_RELEASE: v0.40.5
AGENT_RELEASE: v0.41.1
OTEL_VERSION: v0.96.0
refs:
variants:
Expand Down
1 change: 1 addition & 0 deletions docs/sources/flow/reference/compatibility/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ The following components, grouped by namespace, _export_ OpenTelemetry `otelcol.
- [otelcol.connector.servicegraph](../components/otelcol.connector.servicegraph)
- [otelcol.connector.spanlogs](../components/otelcol.connector.spanlogs)
- [otelcol.connector.spanmetrics](../components/otelcol.connector.spanmetrics)
- [otelcol.exporter.debug](../components/otelcol.exporter.debug)
- [otelcol.exporter.loadbalancing](../components/otelcol.exporter.loadbalancing)
- [otelcol.exporter.logging](../components/otelcol.exporter.logging)
- [otelcol.exporter.loki](../components/otelcol.exporter.loki)
Expand Down
102 changes: 102 additions & 0 deletions docs/sources/flow/reference/components/otelcol.exporter.debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
aliases:
- /docs/grafana-cloud/agent/flow/reference/components/otelcol.exporter.debug/
- /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/otelcol.exporter.debug/
- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/reference/components/otelcol.exporter.debug/
- /docs/grafana-cloud/send-data/agent/flow/reference/components/otelcol.exporter.debug/
canonical: https://grafana.com/docs/agent/latest/flow/reference/components/otelcol.exporter.debug/
description: Learn about otelcol.exporter.debug
labels:
stage: experimental
title: otelcol.exporter.debug
---

# otelcol.exporter.debug

`otelcol.exporter.debug` accepts telemetry data from other `otelcol` components and writes them to the console (stderr).
You can control the verbosity of the logs.

{{< admonition type="note" >}}
`otelcol.exporter.debug` is a wrapper over the upstream OpenTelemetry Collector `debug` exporter.
If necessary, bug reports or feature requests are redirected to the upstream repository.
{{< /admonition >}}

Multiple `otelcol.exporter.debug` components can be specified by giving them different labels.

## Usage

```river
otelcol.exporter.debug "LABEL" { }
```

## Arguments

`otelcol.exporter.debug` supports the following arguments:

Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`verbosity` | `string` | Verbosity of the generated logs. | `"normal"` | no
`sampling_initial` | `int` | Number of messages initially logged each second. | `2` | no
`sampling_thereafter` | `int` | Sampling rate after the initial messages are logged. | `500` | no

The `verbosity` argument must be one of `"basic"`, `"normal"`, or `"detailed"`.

## Exported fields

The following fields are exported and can be referenced by other components:

Name | Type | Description
---- | ---- | -----------
`input` | `otelcol.Consumer` | A value that other components can use to send telemetry data to.

`input` accepts `otelcol.Consumer` data for any telemetry signal (metrics,
logs, or traces).

## Component health

`otelcol.exporter.debug` is only reported as unhealthy if given an invalid
configuration.

## Debug information

`otelcol.exporter.debug` does not expose any component-specific debug
information.

## Example

This example scrapes Prometheus UNIX metrics and writes them to the console:

```river
prometheus.exporter.unix "default" { }
prometheus.scrape "default" {
targets = prometheus.exporter.unix.default.targets
forward_to = [otelcol.receiver.prometheus.default.receiver]
}
otelcol.receiver.prometheus "default" {
output {
metrics = [otelcol.exporter.debug.default.input]
}
}
otelcol.exporter.debug "default" {
verbosity = "detailed"
sampling_initial = 1
sampling_thereafter = 1
}
```
<!-- START GENERATED COMPATIBLE COMPONENTS -->

## Compatible components

`otelcol.exporter.debug` has exports that can be consumed by the following components:

- Components that consume [OpenTelemetry `otelcol.Consumer`](../../compatibility/#opentelemetry-otelcolconsumer-consumers)

{{< admonition type="note" >}}
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The following arguments are supported:
Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`endpoint` | `string` | `host:port` to listen for traffic on. | `"0.0.0.0:14268"` | no
`max_request_body_size` | `string` | Maximum request body size the server will allow. No limit when unset. | | no
`max_request_body_size` | `string` | Maximum request body size the server will allow. | `20MiB` | no
`include_metadata` | `boolean` | Propagate incoming connection metadata to downstream consumers. | | no

### cors block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The following arguments are supported:
Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`endpoint` | `string` | `host:port` to listen for traffic on. | `"0.0.0.0:4318"` | no
`max_request_body_size` | `string` | Maximum request body size the server will allow. No limit when unset. | | no
`max_request_body_size` | `string` | Maximum request body size the server will allow. | `20MiB` | no
`include_metadata` | `boolean` | Propagate incoming connection metadata to downstream consumers. | | no
`traces_url_path` | `string` | The URL path to receive traces on. | `"/v1/traces"`| no
`metrics_url_path` | `string` | The URL path to receive metrics on. | `"/v1/metrics"` | no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`parse_string_tags` | `bool` | Parse string tags and binary annotations into non-string types. | `false` | no
`endpoint` | `string` | `host:port` to listen for traffic on. | `"0.0.0.0:9411"` | no
`max_request_body_size` | `string` | Maximum request body size the HTTP server will allow. No limit when unset. | | no
`max_request_body_size` | `string` | Maximum request body size the server will allow. | `20MiB` | no
`include_metadata` | `boolean` | Propagate incoming connection metadata to downstream consumers. | | no

If `parse_string_tags` is `true`, string tags and binary annotations are
Expand Down
11 changes: 11 additions & 0 deletions docs/sources/flow/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,24 @@ Other release notes for the different {{< param "PRODUCT_ROOT_NAME" >}} variants
[release-notes-operator]: {{< relref "../operator/release-notes.md" >}}
{{< /admonition >}}

## v0.41.1

### Breaking change: `max_request_body_size` for `otelcol.receiver.otlp`,`otelcol.receiver.zipkin`,`otelcol.receiver.jaeger` changed

The default value for `max_request_body_size` changed from unlimited to `20 MiB`. There is no ability to change `max_request_body_size`
to accept unlimited requests.

## v0.41

### Breaking change: default `otelcol.receiver.opencensus` list port changed

The default listen port for `otelcol.receiver.opencensus` has changed from 4317 to 55678 to align with the upstream defaults.
To retain the previous listen port, explicitly set the `endpoint` argument to `0.0.0.0:4317` before upgrading.

### Breaking change: default `mimir.rules.kubernetes` sync interval changed

The default sync interval for `mimir.rules.kubernetes` has changed from `30s` to `5m` to reduce load on Mimir.

## v0.40

### Breaking change: Prohibit the configuration of services within modules.
Expand Down
4 changes: 3 additions & 1 deletion docs/sources/flow/tasks/configure/configure-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Use this method if you prefer to embed your {{< param "PRODUCT_NAME" >}} configu
```yaml
agent:
mode: "flow"
configMap:
content: |-
// Write your Agent config here:
Expand Down Expand Up @@ -142,7 +143,8 @@ Use this method if you prefer to write your {{< param "PRODUCT_NAME" >}} configu
1. Modify Helm Chart's configuration in your `values.yaml` to use the existing ConfigMap:

```yaml
agent:
agent:
mode: "flow"
configMap:
create: false
name: agent-config
Expand Down
Loading

0 comments on commit dd40e2b

Please sign in to comment.