diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 0c5dc80e0220..6e80c9b6978b 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -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' diff --git a/CHANGELOG.md b/CHANGELOG.md index f2cfcda9c0a3..5806e91cc4bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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) diff --git a/docs/developer/release/8-update-helm-charts.md b/docs/developer/release/8-update-helm-charts.md index 00dbaaa9165b..a544068603e1 100644 --- a/docs/developer/release/8-update-helm-charts.md +++ b/docs/developer/release/8-update-helm-charts.md @@ -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. diff --git a/docs/make-docs b/docs/make-docs index 0a1730e6c6fe..f531df2ebb17 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -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 @@ -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 @@ -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 </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 <}} +`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 +} +``` + + +## 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 >}} + + \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md b/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md index a77bc58c376e..b4a6e0f1058a 100644 --- a/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md +++ b/docs/sources/flow/reference/components/otelcol.receiver.jaeger.md @@ -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 diff --git a/docs/sources/flow/reference/components/otelcol.receiver.otlp.md b/docs/sources/flow/reference/components/otelcol.receiver.otlp.md index 86b3633c4ac5..116591fae318 100644 --- a/docs/sources/flow/reference/components/otelcol.receiver.otlp.md +++ b/docs/sources/flow/reference/components/otelcol.receiver.otlp.md @@ -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 diff --git a/docs/sources/flow/reference/components/otelcol.receiver.zipkin.md b/docs/sources/flow/reference/components/otelcol.receiver.zipkin.md index 87ed3b6cedfc..077aae622d14 100644 --- a/docs/sources/flow/reference/components/otelcol.receiver.zipkin.md +++ b/docs/sources/flow/reference/components/otelcol.receiver.zipkin.md @@ -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 diff --git a/docs/sources/flow/release-notes.md b/docs/sources/flow/release-notes.md index b5e311127a57..984e76c68ddf 100644 --- a/docs/sources/flow/release-notes.md +++ b/docs/sources/flow/release-notes.md @@ -29,6 +29,13 @@ 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 @@ -36,6 +43,10 @@ Other release notes for the different {{< param "PRODUCT_ROOT_NAME" >}} variants 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. diff --git a/docs/sources/flow/tasks/configure/configure-kubernetes.md b/docs/sources/flow/tasks/configure/configure-kubernetes.md index 332f38102dfb..8f05f8cdf8b6 100644 --- a/docs/sources/flow/tasks/configure/configure-kubernetes.md +++ b/docs/sources/flow/tasks/configure/configure-kubernetes.md @@ -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: @@ -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 diff --git a/docs/sources/flow/tasks/debug.md b/docs/sources/flow/tasks/debug.md index 9b5dfb2cab90..69d4090f057b 100644 --- a/docs/sources/flow/tasks/debug.md +++ b/docs/sources/flow/tasks/debug.md @@ -65,7 +65,7 @@ Follow these steps to debug issues with {{< param "PRODUCT_NAME" >}}: ### Home page -![](../../assets/ui_home_page.png) +![The Agent UI home page showing a table of components.](/media/docs/agent/ui_home_page.png) The home page shows a table of components defined in the configuration file and their health. @@ -75,14 +75,14 @@ Click the {{< param "PRODUCT_ROOT_NAME" >}} logo to navigate back to the home pa ### Graph page -![](../../assets/ui_graph_page.png) +![The Graph page showing a graph view of components.](/media/docs/agent/ui_graph_page.png) The **Graph** page shows a graph view of components defined in the configuration file and their health. Clicking a component in the graph navigates to the [Component detail page](#component-detail-page) for that component. ### Component detail page -![](../../assets/ui_component_detail_page.png) +![The component detail page showing detailed information about the components.](/media/docs/agent/ui_component_detail_page.png) The component detail page shows the following information for each component: @@ -95,9 +95,9 @@ The component detail page shows the following information for each component: ### Clustering page -![](../../assets/ui_clustering_page.png) +![The Clustering page showing detailed information about each cluster node.](/media/docs/agent/ui_clustering_page.png) -The clustering page shows the following information for each cluster node: +The Clustering page shows the following information for each cluster node: * The node's name. * The node's advertised address. @@ -144,5 +144,3 @@ Some issues that appear to be clustering issues may be symptoms of other issues, for example, problems with scraping or service discovery can result in missing metrics for an agent that can be interpreted as a node not joining the cluster. {{< /admonition >}} - - diff --git a/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md b/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md index 031690fa1e95..632b5475c1df 100644 --- a/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md +++ b/docs/sources/flow/tasks/opentelemetry-to-lgtm-stack.md @@ -165,7 +165,7 @@ loki.write "default" { To use Loki with basic-auth, which is required with Grafana Cloud Loki, you must configure the [loki.write](ref:loki.write) component. You can get the Loki configuration from the Loki **Details** page in the [Grafana Cloud Portal][]: -![](../../../assets/tasks/loki-config.png) +![The Loki Details page showing information about the Loki configuration.](/media/docs/agent/loki-config.png) ```river otelcol.exporter.loki "grafana_cloud_loki" { @@ -200,7 +200,7 @@ otelcol.exporter.otlp "default" { To use Tempo with basic-auth, which is required with Grafana Cloud Tempo, you must use the [otelcol.auth.basic](ref:otelcol.auth.basic) component. You can get the Tempo configuration from the Tempo **Details** page in the [Grafana Cloud Portal][]: -![](../../../assets/tasks/tempo-config.png) +![The Tempo Details page showing information about the Tempo configuration.](/media/docs/agent//tempo-config.png) ```river otelcol.exporter.otlp "grafana_cloud_tempo" { @@ -237,7 +237,7 @@ prometheus.remote_write "default" { To use Prometheus with basic-auth, which is required with Grafana Cloud Prometheus, you must configure the [prometheus.remote_write](ref:prometheus.remote_write) component. You can get the Prometheus configuration from the Prometheus **Details** page in the [Grafana Cloud Portal][]: -![](../../../assets/tasks/prometheus-config.png) +![The Prometheus Details page showing information about the Prometheus configuration.](/media/docs/agent/prometheus-config.png) ```river otelcol.exporter.prometheus "grafana_cloud_prometheus" { @@ -361,9 +361,9 @@ ts=2023-05-09T09:37:15.304109Z component=otelcol.receiver.otlp.default level=inf ts=2023-05-09T09:37:15.304234Z component=otelcol.receiver.otlp.default level=info msg="Starting HTTP server" endpoint=0.0.0.0:4318 ``` -You can now check the pipeline graphically by visiting http://localhost:12345/graph +You can now check the pipeline graphically by visiting -![](../../../assets/tasks/otlp-lgtm-graph.png) +![The Graph page showing a graphical representation of the pipeline.](/media/docs/agent/otlp-lgtm-graph.png) [OpenTelemetry]: https://opentelemetry.io [Grafana Loki]: https://grafana.com/oss/loki/ @@ -371,4 +371,3 @@ You can now check the pipeline graphically by visiting http://localhost:12345/gr [Grafana Cloud Portal]: https://grafana.com/docs/grafana-cloud/account-management/cloud-portal#your-grafana-cloud-stack [Prometheus Remote Write]: https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage [Grafana Mimir]: https://grafana.com/oss/mimir/ - diff --git a/docs/sources/operator/release-notes.md b/docs/sources/operator/release-notes.md index c8f3812dbc24..9c83ca534b6f 100644 --- a/docs/sources/operator/release-notes.md +++ b/docs/sources/operator/release-notes.md @@ -14,7 +14,7 @@ refs: release-notes-static: - pattern: /docs/agent/ destination: /docs/agent//static/release-notes/ - - pattern: /docs/agent/ + - pattern: /docs/grafana-cloud/ destination: /docs/grafana-cloud/send-data/agent/static/release-notes/ release-notes-flow: - pattern: /docs/agent/ diff --git a/docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md b/docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md index 6495625b76c8..7379895146cd 100644 --- a/docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md +++ b/docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md @@ -355,19 +355,19 @@ pick the ones you need. `length` controls how far back in time CloudWatch metrics are considered during each agent scrape. If both settings are configured, the time parameters when calling CloudWatch APIs work as follows: -![](https://grafana.com/media/docs/agent/cloudwatch-period-and-length-time-model-2.png) +![A diagram showing how the time parameters work when both period and length are configured.](/media/docs/agent/cloudwatch-period-and-length-time-model-2.png) -As noted above, if there is a different `period` or `length` across multiple metrics under the same static or discovery job, +As noted above, if there is a different `period` or `length` across multiple metrics under the same static or discovery job, the minimum of all periods, and maximum of all lengths is configured. -On the other hand, if `length` is not configured, both period and length settings are calculated based on +On the other hand, if `length` isn't configured, both period and length settings are calculated based on the required `period` configuration attribute. If all metrics within a job (discovery or static) have the same `period` value configured, CloudWatch APIs will be -requested for metrics from the scrape time, to `period`s seconds in the past. +requested for metrics from the scrape time, to `period`s seconds in the past. The values of these metrics are exported to Prometheus. -![](https://grafana.com/media/docs/agent/cloudwatch-single-period-time-model.png) +![A diagram showing how the time parameters work when a single period is configured.](/media/docs/agent/cloudwatch-single-period-time-model.png) On the other hand, if metrics with different `period`s are configured under an individual job, this works differently. First, two variables are calculated aggregating all periods: `length`, taking the maximum value of all periods, and @@ -375,7 +375,7 @@ the new `period` value, taking the minimum of all periods. Then, CloudWatch APIs `now - length` to `now`, aggregating each in samples for `period` seconds. For each metric, the most recent sample is exported to CloudWatch. -![](https://grafana.com/media/docs/agent/cloudwatch-multiple-period-time-model.png) +![A diagram showing how the time parameters work when multiple periods are configured.](/media/docs/agent/cloudwatch-multiple-period-time-model.png) ## Supported services in discovery jobs diff --git a/go.mod b/go.mod index 1bb16c639450..9d86f0078e1e 100644 --- a/go.mod +++ b/go.mod @@ -615,6 +615,7 @@ require ( go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 golang.org/x/crypto/x509roots/fallback v0.0.0-20240208163226-62c9f1799c91 k8s.io/apimachinery v0.29.2 @@ -768,8 +769,14 @@ replace ( // https://github.com/open-telemetry/opentelemetry-collector/pull/7696 // https://github.com/open-telemetry/opentelemetry-collector/issues/4970 replace ( - go.opentelemetry.io/collector/otelcol => github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240321103955-8919a1c85cbe - go.opentelemetry.io/collector/service => github.com/grafana/opentelemetry-collector/service v0.0.0-20240321103955-8919a1c85cbe + go.opentelemetry.io/collector/otelcol => github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240606144032-13b77f7c5603 + go.opentelemetry.io/collector/service => github.com/grafana/opentelemetry-collector/service v0.0.0-20240606144032-13b77f7c5603 +) + +// This is to fix https://opentelemetry.io/blog/2024/cve-2024-36129 +replace ( + go.opentelemetry.io/collector/config/configgrpc => github.com/grafana/opentelemetry-collector/config/configgrpc v0.0.0-20240606144032-13b77f7c5603 + go.opentelemetry.io/collector/config/confighttp => github.com/grafana/opentelemetry-collector/config/confighttp v0.0.0-20240606144032-13b77f7c5603 ) // Required to avoid an ambiguous import with github.com/tencentcloud/tencentcloud-sdk-go diff --git a/go.sum b/go.sum index bf0ccc51ce9a..5443c037ec8e 100644 --- a/go.sum +++ b/go.sum @@ -1051,10 +1051,14 @@ github.com/grafana/mysqld_exporter v0.12.2-0.20231005125903-364b9c41e595 h1:I9sR github.com/grafana/mysqld_exporter v0.12.2-0.20231005125903-364b9c41e595/go.mod h1:U8ifHC5pT2WuVTO7ki4KZmWLjfEKfktQiU3bh0J8scw= github.com/grafana/node_exporter v0.18.1-grafana-r01.0.20231004161416-702318429731 h1:vyyIYY2sLpmgFIckJ1vSO/oYkvB0thDF6UiFYp5PThM= github.com/grafana/node_exporter v0.18.1-grafana-r01.0.20231004161416-702318429731/go.mod h1:vOZxEzxm0nZmuNqjtIfvtmvdRtJik9POmcN5mQVLf5E= -github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240321103955-8919a1c85cbe h1:XffwtyK11B/undScvvYBi/LSWG7ob43lzkdhxmxZkJw= -github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240321103955-8919a1c85cbe/go.mod h1:Xo58hEmoZFLyOIs9Wk400ME9gEFV+ttxCGcls6NxbhI= -github.com/grafana/opentelemetry-collector/service v0.0.0-20240321103955-8919a1c85cbe h1:LEmmaAnTjtp7pWCsnc8iMfuHIHzDbYIiCXnxpMTOLms= -github.com/grafana/opentelemetry-collector/service v0.0.0-20240321103955-8919a1c85cbe/go.mod h1:9El7PPhnV+2xPXLlyileLaUa5mOE+vw6sswmcZBaUlc= +github.com/grafana/opentelemetry-collector/config/configgrpc v0.0.0-20240606144032-13b77f7c5603 h1:F3jPOSv2BEO9kuCmlC02pyykcUPkDvgEfWC2pbcWq9M= +github.com/grafana/opentelemetry-collector/config/configgrpc v0.0.0-20240606144032-13b77f7c5603/go.mod h1:uUxDCwvWvyf331boTH8/gZhUXXST2r1ps5+ZAvxZl4o= +github.com/grafana/opentelemetry-collector/config/confighttp v0.0.0-20240606144032-13b77f7c5603 h1:f/rfuBzUEi7zV/bgazSeBH+I4z7a5JoeuhrZEl6ftic= +github.com/grafana/opentelemetry-collector/config/confighttp v0.0.0-20240606144032-13b77f7c5603/go.mod h1:KWac7J9mNFjtN4dQz8AUmFVBr7c2UOfo5OM7wfdPToI= +github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240606144032-13b77f7c5603 h1:g0fFX99XCDM8BOHnvJ3yLaRd4GPz9BcmiuDzB29GteM= +github.com/grafana/opentelemetry-collector/otelcol v0.0.0-20240606144032-13b77f7c5603/go.mod h1:Xo58hEmoZFLyOIs9Wk400ME9gEFV+ttxCGcls6NxbhI= +github.com/grafana/opentelemetry-collector/service v0.0.0-20240606144032-13b77f7c5603 h1:ItTHpGwsZ1JvHKUZ0OzMI9KseTE29fHf/sHhC+86BjM= +github.com/grafana/opentelemetry-collector/service v0.0.0-20240606144032-13b77f7c5603/go.mod h1:9El7PPhnV+2xPXLlyileLaUa5mOE+vw6sswmcZBaUlc= github.com/grafana/postgres_exporter v0.15.1-0.20240417113938-9358270470dd h1:vNHdecaOmYgSHMEQRgyzWacV++N38Jp8qLZg0RCsfFo= github.com/grafana/postgres_exporter v0.15.1-0.20240417113938-9358270470dd/go.mod h1:kR16GJ0ZwWVQ2osW3pgtDJU1a/GXpufrwio0kLG14cg= github.com/grafana/prometheus v1.8.2-0.20240130142130-51b39f24d406 h1:LVIOYe5j92m10wluP5hgeHqSkOLnZzcPxhYCkdbLXCE= @@ -2313,10 +2317,6 @@ go.opentelemetry.io/collector/config/configauth v0.96.0 h1:nnRLtaPVafazVij60/Q6q go.opentelemetry.io/collector/config/configauth v0.96.0/go.mod h1:XABE3s1OiLzjhHv6R/eMOp8fYFweF6/Naa9NgDD+Ntg= go.opentelemetry.io/collector/config/configcompression v0.96.0 h1:mbP0YbYTfbpovxcZE6JrBYmWg5G1Dozj7eOuLAdqcI4= go.opentelemetry.io/collector/config/configcompression v0.96.0/go.mod h1:owL6s04LI1fPrNZvXiRm6o4B0jaxb3z/oFEcgrakFK4= -go.opentelemetry.io/collector/config/configgrpc v0.96.0 h1:FxCtsN8V4zYYq5wlSYAjBs3OEI1AbjfzmzSPkHYZKkY= -go.opentelemetry.io/collector/config/configgrpc v0.96.0/go.mod h1:uUxDCwvWvyf331boTH8/gZhUXXST2r1ps5+ZAvxZl4o= -go.opentelemetry.io/collector/config/confighttp v0.96.0 h1:/piTkhB+UhhkvHc2PmHBuZzvp0okWTGiL/kZIh+zMmQ= -go.opentelemetry.io/collector/config/confighttp v0.96.0/go.mod h1:KWac7J9mNFjtN4dQz8AUmFVBr7c2UOfo5OM7wfdPToI= go.opentelemetry.io/collector/config/confignet v0.96.0 h1:ZUwziVVxWgcRMqukfKfdEjxfgmfhGsX6J3GEzF/Pupk= go.opentelemetry.io/collector/config/confignet v0.96.0/go.mod h1:BVw5xkQ7TH2wH75cbph+dtOoxq1baWLuhdSYIAvuVu0= go.opentelemetry.io/collector/config/configopaque v1.3.0 h1:J60RL/XxGmBF+OX2+Gx+yAo/p7YwjSsOOlPlo1yXotA= @@ -2349,6 +2349,8 @@ go.opentelemetry.io/collector/consumer v0.96.0 h1:JN4JHelp5EGMGoC2UVelTMG6hyZjgt go.opentelemetry.io/collector/consumer v0.96.0/go.mod h1:Vn+qzzKgekDFayCVV8peSH5Btx1xrt/bmzD9gTxgidQ= go.opentelemetry.io/collector/exporter v0.96.0 h1:SmOSaP+zUNq0nl+BcllsCSsYePdUNIIUfW5sXKKaUlI= go.opentelemetry.io/collector/exporter v0.96.0/go.mod h1:DcuGaxcINhOV2LgojDI56r3830cUtuCsNadINMIU23c= +go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 h1:88v2GWCIuYgd3e4KdwF0JLklIgBzETBw0e3dkEJ7BbI= +go.opentelemetry.io/collector/exporter/debugexporter v0.96.0/go.mod h1:mZjJ0G6Pn6aSS7T4UeEjXSHt3pgslvaZa/4Uam8DKuo= go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 h1:fKHt4iTcD7C0utDzeww6ZYVlDYaC0dw9wtzVwLha4CM= go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0/go.mod h1:vpuKdiIQ6yjwZbKiiAs/MV8rZMKiQfPF55vX8UxO8fk= go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 h1:vZEd10B/zj7WkBWSVegDkGOwv7FZhUwyk60E2zkYwL4= diff --git a/internal/component/all/all.go b/internal/component/all/all.go index f6911eb95b30..75156137b027 100644 --- a/internal/component/all/all.go +++ b/internal/component/all/all.go @@ -70,6 +70,7 @@ import ( _ "github.com/grafana/agent/internal/component/otelcol/connector/servicegraph" // Import otelcol.connector.servicegraph _ "github.com/grafana/agent/internal/component/otelcol/connector/spanlogs" // Import otelcol.connector.spanlogs _ "github.com/grafana/agent/internal/component/otelcol/connector/spanmetrics" // Import otelcol.connector.spanmetrics + _ "github.com/grafana/agent/internal/component/otelcol/exporter/debug" // Import otelcol.exporter.debug _ "github.com/grafana/agent/internal/component/otelcol/exporter/loadbalancing" // Import otelcol.exporter.loadbalancing _ "github.com/grafana/agent/internal/component/otelcol/exporter/logging" // Import otelcol.exporter.logging _ "github.com/grafana/agent/internal/component/otelcol/exporter/loki" // Import otelcol.exporter.loki diff --git a/internal/component/faro/receiver/internal/payload/payload.go b/internal/component/faro/receiver/internal/payload/payload.go index 15e7a970e1f5..37d4b5059a39 100644 --- a/internal/component/faro/receiver/internal/payload/payload.go +++ b/internal/component/faro/receiver/internal/payload/payload.go @@ -220,7 +220,7 @@ type Measurement struct { Context MeasurementContext `json:"context,omitempty"` } -// KeyVal representation of the exception object +// KeyVal representation of the measurement object func (m Measurement) KeyVal() *KeyVal { kv := NewKeyVal() @@ -238,6 +238,14 @@ func (m Measurement) KeyVal() *KeyVal { } MergeKeyVal(kv, m.Trace.KeyVal()) MergeKeyValWithPrefix(kv, KeyValFromMap(m.Context), "context_") + + values := make(map[string]float64, len(m.Values)) + for key, value := range m.Values { + values[key] = value + } + + MergeKeyValWithPrefix(kv, KeyValFromFloatMap(values), "value_") + return kv } diff --git a/internal/component/faro/receiver/internal/payload/payload_test.go b/internal/component/faro/receiver/internal/payload/payload_test.go index 5944a2b10e34..7b3e1cc8f05e 100644 --- a/internal/component/faro/receiver/internal/payload/payload_test.go +++ b/internal/component/faro/receiver/internal/payload/payload_test.go @@ -139,4 +139,24 @@ func TestUnmarshalPayloadJSON(t *testing.T) { }, }, }, payload.Measurements) + + kv := payload.Measurements[0].KeyVal() + expectedKv := NewKeyVal() + expectedKv.Set("kind", "measurement") + expectedKv.Set("type", "foobar") + expectedKv.Set("ttfb", 14.000000) + expectedKv.Set("ttfcp", 22.120000) + expectedKv.Set("ttfp", 20.120000) + expectedKv.Set("traceID", "abcd") + expectedKv.Set("spanID", "def") + expectedKv.Set("context_hello", "world") + expectedKv.Set("value_ttfb", 14) + expectedKv.Set("value_ttfcp", 22.12) + expectedKv.Set("value_ttfp", 20.12) + expectedPair := kv.Oldest() + for pair := kv.Oldest(); pair != nil; pair = pair.Next() { + require.Equal(t, expectedPair.Key, pair.Key) + require.Equal(t, expectedPair.Value, pair.Value) + expectedPair = expectedPair.Next() + } } diff --git a/internal/component/faro/receiver/internal/payload/utils.go b/internal/component/faro/receiver/internal/payload/utils.go index dc6e58c90760..c9be5184bb5c 100644 --- a/internal/component/faro/receiver/internal/payload/utils.go +++ b/internal/component/faro/receiver/internal/payload/utils.go @@ -29,6 +29,20 @@ func KeyValFromMap(m map[string]string) *KeyVal { return kv } +// KeyValFromMap will instantiate KeyVal from a map[string]float64 +func KeyValFromFloatMap(m map[string]float64) *KeyVal { + kv := NewKeyVal() + keys := make([]string, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + kv.Set(k, m[k]) + } + return kv +} + // MergeKeyVal will merge source in target func MergeKeyVal(target *KeyVal, source *KeyVal) { for el := source.Oldest(); el != nil; el = el.Next() { diff --git a/internal/component/otelcol/exporter/debug/debug.go b/internal/component/otelcol/exporter/debug/debug.go new file mode 100644 index 000000000000..66d0ad40b9ca --- /dev/null +++ b/internal/component/otelcol/exporter/debug/debug.go @@ -0,0 +1,96 @@ +package debug + +import ( + "fmt" + + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter" + "github.com/grafana/agent/internal/featuregate" + otelcomponent "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" + otelextension "go.opentelemetry.io/collector/extension" +) + +func init() { + component.Register(component.Registration{ + Name: "otelcol.exporter.debug", + Args: Arguments{}, + Exports: otelcol.ConsumerExports{}, + Stability: featuregate.StabilityExperimental, + + Build: func(opts component.Options, args component.Arguments) (component.Component, error) { + fact := debugexporter.NewFactory() + return exporter.New(opts, fact, args.(Arguments), exporter.TypeAll) + }, + }) +} + +type Arguments struct { + Verbosity string `river:"verbosity,attr,optional"` + SamplingInitial int `river:"sampling_initial,attr,optional"` + SamplingThereafter int `river:"sampling_thereafter,attr,optional"` +} + +func (args Arguments) convertVerbosity() (configtelemetry.Level, error) { + var verbosity configtelemetry.Level + switch args.Verbosity { + case "basic": + verbosity = configtelemetry.LevelBasic + case "normal": + verbosity = configtelemetry.LevelNormal + case "detailed": + verbosity = configtelemetry.LevelDetailed + default: + // Invalid verbosity + // debugexporter only supports basic, normal and detailed levels + return verbosity, fmt.Errorf("invalid verbosity %q", args.Verbosity) + } + + return verbosity, nil +} + +var _ exporter.Arguments = Arguments{} + +// DefaultArguments holds default values for Arguments. +var DefaultArguments = Arguments{ + Verbosity: "normal", + SamplingInitial: 2, + SamplingThereafter: 500, +} + +// SetToDefault implements river.Defaulter. +func (args *Arguments) SetToDefault() { + *args = DefaultArguments +} + +// Convert implements exporter.Arguments. +func (args Arguments) Convert() (otelcomponent.Config, error) { + verbosity, err := args.convertVerbosity() + if err != nil { + return nil, fmt.Errorf("error in conversion to config arguments, %v", err) + } + + return &debugexporter.Config{ + Verbosity: verbosity, + SamplingInitial: args.SamplingInitial, + SamplingThereafter: args.SamplingThereafter, + }, nil +} + +// Extensions implements exporter.Arguments. +func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension { + return nil +} + +// Exporters implements exporter.Arguments. +func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component { + return nil +} + +// DebugMetricsConfig implements receiver.Arguments. +func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments { + var debugMetrics otelcol.DebugMetricsArguments + return debugMetrics +} diff --git a/internal/component/otelcol/exporter/debug/debug_test.go b/internal/component/otelcol/exporter/debug/debug_test.go new file mode 100644 index 000000000000..85d180bf9a51 --- /dev/null +++ b/internal/component/otelcol/exporter/debug/debug_test.go @@ -0,0 +1,79 @@ +package debug_test + +import ( + "fmt" + "testing" + + "github.com/grafana/agent/internal/component/otelcol/exporter/debug" + "github.com/grafana/river" + "github.com/stretchr/testify/require" + otelcomponent "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" +) + +func Test(t *testing.T) { + tests := []struct { + testName string + args string + expectedReturn debugexporter.Config + errorMsg string + }{ + { + testName: "defaultConfig", + args: ``, + expectedReturn: debugexporter.Config{ + Verbosity: configtelemetry.LevelNormal, + SamplingInitial: 2, + SamplingThereafter: 500, + }, + }, + + { + testName: "validConfig", + args: ` + verbosity = "detailed" + sampling_initial = 5 + sampling_thereafter = 20 + `, + expectedReturn: debugexporter.Config{ + Verbosity: configtelemetry.LevelDetailed, + SamplingInitial: 5, + SamplingThereafter: 20, + }, + }, + + { + testName: "invalidConfig", + args: ` + verbosity = "test" + sampling_initial = 5 + sampling_thereafter = 20 + `, + errorMsg: "error in conversion to config arguments", + }, + } + + for _, tc := range tests { + t.Run(tc.testName, func(t *testing.T) { + var args debug.Arguments + err := river.Unmarshal([]byte(tc.args), &args) + require.NoError(t, err) + + actualPtr, err := args.Convert() + if tc.errorMsg != "" { + require.ErrorContains(t, err, tc.errorMsg) + return + } + + require.NoError(t, err) + + actual := actualPtr.(*debugexporter.Config) + fmt.Printf("Passed conversion") + + require.NoError(t, otelcomponent.ValidateConfig(actual)) + + require.Equal(t, tc.expectedReturn, *actual) + }) + } +} diff --git a/operations/helm/charts/grafana-agent/CHANGELOG.md b/operations/helm/charts/grafana-agent/CHANGELOG.md index 8d8acd10635f..19fe15f10670 100644 --- a/operations/helm/charts/grafana-agent/CHANGELOG.md +++ b/operations/helm/charts/grafana-agent/CHANGELOG.md @@ -7,6 +7,20 @@ This document contains a historical list of changes between releases. Only changes that impact end-user behavior are listed; changes to documentation or internal API changes are not present. +0.41.0 (2024-06-07) +---------- + +### Enhancements + +- Update Grafana Agent version to v0.41.1. (@mattdurham) + +0.40.0 (2024-05-31) +---------- + +### Enhancements + +- Update Grafana Agent version to v0.41.0. (@erikbaranowski) + 0.39.0 (2024-05-15) ---------- diff --git a/operations/helm/charts/grafana-agent/Chart.yaml b/operations/helm/charts/grafana-agent/Chart.yaml index 9f4e7a3d59d6..49a37997ceda 100644 --- a/operations/helm/charts/grafana-agent/Chart.yaml +++ b/operations/helm/charts/grafana-agent/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: grafana-agent description: 'Grafana Agent' type: application -version: 0.39.0 -appVersion: 'v0.40.5' +version: 0.41.0 +appVersion: 'v0.41.1' dependencies: - name: crds diff --git a/operations/helm/charts/grafana-agent/README.md b/operations/helm/charts/grafana-agent/README.md index 1651129fe097..f9308b6db569 100644 --- a/operations/helm/charts/grafana-agent/README.md +++ b/operations/helm/charts/grafana-agent/README.md @@ -1,6 +1,6 @@ # Grafana Agent Helm chart -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.39.0](https://img.shields.io/badge/Version-0.39.0-informational?style=flat-square) ![AppVersion: v0.40.5](https://img.shields.io/badge/AppVersion-v0.40.5-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.41.0](https://img.shields.io/badge/Version-0.41.0-informational?style=flat-square) ![AppVersion: v0.41.1](https://img.shields.io/badge/AppVersion-v0.41.1-informational?style=flat-square) Helm chart for deploying [Grafana Agent][] to Kubernetes. diff --git a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml index 8342110f5701..10646a50a00c 100644 --- a/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/additional-serviceaccount-label/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml index 1965dea1b4ff..5a18082becfe 100644 --- a/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/clustering/grafana-agent/templates/controllers/statefulset.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml index f2680dd3e0af..153a0656f2f7 100644 --- a/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/controller-volumes-extra/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml index 6f17cb5b4191..4ca333fac2fd 100644 --- a/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset-hostnetwork/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml index 8342110f5701..10646a50a00c 100644 --- a/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/create-daemonset/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml index ba541d81f563..d89e24c7656f 100644 --- a/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment-autoscaling/grafana-agent/templates/controllers/deployment.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml index 3c444d7d3058..ae9bb7994f30 100644 --- a/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/create-deployment/grafana-agent/templates/controllers/deployment.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml index 38b7fa4d4ca0..236088c60321 100644 --- a/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset-autoscaling/grafana-agent/templates/controllers/statefulset.yaml @@ -29,7 +29,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml b/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml index 44fe6cbbc98c..c7f01f36ed7f 100644 --- a/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml +++ b/operations/helm/tests/create-statefulset/grafana-agent/templates/controllers/statefulset.yaml @@ -30,7 +30,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml index 8342110f5701..10646a50a00c 100644 --- a/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/custom-config/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml index 8342110f5701..10646a50a00c 100644 --- a/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/default-values/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml index d949e5e76504..608585d64fcc 100644 --- a/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/enable-servicemonitor-tls/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml index 8342110f5701..10646a50a00c 100644 --- a/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/enable-servicemonitor/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml index fc1efb454dc0..4e921fde3e94 100644 --- a/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/envFrom/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml index d2091f0387af..4c9e18851982 100644 --- a/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/existing-config/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml index 0511e63ff103..91b2f7b3b7d6 100644 --- a/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-env/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml index 8f7df51a7502..a954b8c15bc4 100644 --- a/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/extra-ports/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml index 060a0e1a686e..4ac402c122ab 100644 --- a/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/faro-ingress/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml index 33d1f363ca63..f223eb95526e 100644 --- a/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml @@ -32,7 +32,7 @@ spec: - name: global-cred containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml index c7640ec7775f..ab3b8cc86645 100644 --- a/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/global-image-registry/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: quay.io/grafana/agent:v0.40.5 + image: quay.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml index 0d1033b105e0..81161eac8261 100644 --- a/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/initcontainers/grafana-agent/templates/controllers/daemonset.yaml @@ -45,7 +45,7 @@ spec: name: geoip containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml index 48861b4ceed9..6558b5eb887e 100644 --- a/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-pullsecrets/grafana-agent/templates/controllers/daemonset.yaml @@ -29,7 +29,7 @@ spec: - name: local-cred containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml index c7640ec7775f..ab3b8cc86645 100644 --- a/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/local-image-registry/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: quay.io/grafana/agent:v0.40.5 + image: quay.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml index 8d906ce4f9d1..1679c438d4ea 100644 --- a/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/nodeselectors-and-tolerations/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/nonroot/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/nonroot/grafana-agent/templates/controllers/daemonset.yaml index 47dd66fddd20..9376ab3b40e1 100644 --- a/operations/helm/tests/nonroot/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/nonroot/grafana-agent/templates/controllers/daemonset.yaml @@ -29,7 +29,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml index 7d435484dad0..f1dc1e30c0af 100644 --- a/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/pod_annotations/grafana-agent/templates/controllers/daemonset.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml index 7a8f63dfe404..fb8d87c88fac 100644 --- a/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/sidecars/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml b/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml index 061ae337a09b..b309d3dd1187 100644 --- a/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml +++ b/operations/helm/tests/static-mode/grafana-agent/templates/controllers/daemonset.yaml @@ -27,7 +27,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - -config.file=/etc/agent/config.yaml diff --git a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml index cfa0ff005d70..4bec438a9f1e 100644 --- a/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml +++ b/operations/helm/tests/topologyspreadconstraints/grafana-agent/templates/controllers/deployment.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: grafana-agent containers: - name: grafana-agent - image: docker.io/grafana/agent:v0.40.5 + image: docker.io/grafana/agent:v0.41.1 imagePullPolicy: IfNotPresent args: - run diff --git a/static/operator/defaults.go b/static/operator/defaults.go index 30ecbc4f2044..406877a5df21 100644 --- a/static/operator/defaults.go +++ b/static/operator/defaults.go @@ -2,7 +2,7 @@ package operator // Supported versions of the Grafana Agent. var ( - DefaultAgentVersion = "v0.40.5" + DefaultAgentVersion = "v0.41.1" DefaultAgentBaseImage = "grafana/agent" DefaultAgentImage = DefaultAgentBaseImage + ":" + DefaultAgentVersion ) diff --git a/tools/gen-versioned-files/agent-version.txt b/tools/gen-versioned-files/agent-version.txt index 6a9c7cb0af27..d0cca40aac25 100644 --- a/tools/gen-versioned-files/agent-version.txt +++ b/tools/gen-versioned-files/agent-version.txt @@ -1 +1 @@ -v0.40.5 +v0.41.1