Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
kgeckhart committed Nov 17, 2023
2 parents d8abf9d + 950870a commit c5c802a
Show file tree
Hide file tree
Showing 498 changed files with 5,061 additions and 4,198 deletions.
128 changes: 64 additions & 64 deletions .drone/drone.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
go-version: "1.21"
- name: Set OTEL Exporter Endpoint
run: echo "OTEL_EXPORTER_ENDPOINT=http://172.17.0.1:8080" >> $GITHUB_ENV
- name: Run tests
run: make integration-test
run: make integration-test
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
name: Test
strategy:
matrix:
platform: [macos-latest]
platform: [macos-latest-xlarge]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
go-version: "1.21"
cache: true
- name: Test
run: make GO_TAGS="nodocker" test
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@b77b85c0254bba6789e787844f0585cde1e56320
uses: aquasecurity/trivy-action@2b6a709cf9c4025c5438138008beaddbb02086f0
with:
image-ref: 'grafana/agent:main'
format: 'template'
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/update-make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@ name: Update `make docs` procedure
on:
schedule:
- cron: '0 7 * * 1-5'
workflow_dispatch:
jobs:
main:
if: github.repository == 'grafana/agent'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update procedure
if: github.repository != 'grafana/writers-toolkit'
run: |
BRANCH=update-make-docs
git checkout -b "${BRANCH}"
curl -s -Lo docs/docs.mk https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
curl -s -Lo docs/make-docs https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
if git diff --exit-code; then exit 0; fi
git add .
git config --local user.email "[email protected]"
git config --local user.name "grafanabot"
git commit -m "Update \`make docs\` procedure"
git push -v origin "refs/heads/${BRANCH}"
gh pr create --fill || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: grafana/writers-toolkit/update-make-docs@update-make-docs/v1
116 changes: 89 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ Main (unreleased)

### Breaking changes

- In the azure exporter, dimension options will no longer be validated by the Azure API. (@kgeckhart)
- This change will not break any existing configurations and you can opt in to validation via the `validate_dimensions` configuration option.
- Before this change, pulling metrics for azure resources with variable dimensions required one configuration per metric + dimension combination to avoid an error.
- After this change, you can include all metrics and dimensions in a single configuration and the Azure APIs will only return dimensions which are valid for the various metrics.

### Enhancements

- Azure exporter enhancements for flow and static mode, (@kgeckhart)
- Allows for pulling metrics at the Azure subscription level instead of resource by resource
- Disable dimension validation by default to reduce the number of exporter instances needed for full dimension coverage

v0.38.0-rc.0 (2023-11-16)
-------------------------

### Breaking changes

- Remove `otelcol.exporter.jaeger` component (@hainenber)

- In the mysqld exporter integration, some metrics are removed and others are renamed. (@marctc)
Expand All @@ -26,11 +42,6 @@ Main (unreleased)
- renamed 3 metrics starting with `mysql_perf_schema_transaction_` to start with `mysql_perf_schema_transactions_` to be consistent with column names.
- exposing only server's own stats by matching `MEMBER_ID` with `@@server_uuid` resulting "member_id" label to be dropped.

- In the azure exporter, dimension options will no longer be validated by the Azure API. (@kgeckhart)
- This change will not break any existing configurations and you can opt in to validation via the `validate_dimensions` configuration option.
- Before this change, pulling metrics for azure resources with variable dimensions required one configuration per metric + dimension combination to avoid an error.
- After this change, you can include all metrics and dimensions in a single configuration and the Azure APIs will only return dimensions which are valid for the various metrics.

### Other changes

- Bump `mysqld_exporter` version to v0.15.0. (@marctc)
Expand Down Expand Up @@ -67,10 +78,56 @@ Main (unreleased)

- `otelcol.processor.filter` - filters OTLP telemetry data using OpenTelemetry
Transformation Language (OTTL). (@hainenber)
- `otelcol.receiver.vcenter` - receives metrics telemetry data from vCenter. (@marctc)

- Agent Management: Introduce support for remotely managed external labels for logs. (@jcreixell)

### Enhancements

- The `loki.write` WAL now has snappy compression enabled by default. (@thepalbi)

- Allow converting labels to structured metadata with Loki's structured_metadata stage. (@gonzalesraul)

- Improved performance of `pyroscope.scrape` component when working with a large number of targets. (@cyriltovena)

- Added support for comma-separated list of fields in `source` option and a
new `separator` option in `drop` stage of `loki.process`. (@thampiotr)

- The `loki.source.docker` component now allows connecting to Docker daemons
over HTTP(S) and setting up TLS credentials. (@tpaschalis)

- Added an `exclude_event_message` option to `loki.source.windowsevent` in flow mode,
which excludes the human-friendly event message from Windows event logs. (@ptodev)

- Improve detection of rolled log files in `loki.source.kubernetes` and
`loki.source.podlogs` (@slim-bean).

- Support clustering in `loki.source.kubernetes` (@slim-bean).

- Support clustering in `loki.source.podlogs` (@rfratto).

- Make component list sortable in web UI. (@hainenber)

- Adds new metrics (`mssql_server_total_memory_bytes`, `mssql_server_target_memory_bytes`,
and `mssql_available_commit_memory_bytes`) for `mssql` integration.

- Grafana Agent Operator: `config-reloader` container no longer runs as root.
(@rootmout)

- Added support for replaying not sent data for `loki.write` when WAL is enabled. (@thepalbi)

- Make the result of 'discovery.kubelet' support pods that without ports, such as k8s control plane static pods. (@masonmei)

- Added support for unicode strings in `pyroscope.ebpf` python profiles. (@korniltsev)

- Improved resilience of graph evaluation in presence of slow components. (@thampiotr)

- Updated windows exporter to use prometheus-community/windows_exporter commit 1836cd1. (@mattdurham)

### Bugfixes

- Set exit code 1 on grafana-agentctl non-runnable command. (@fgouteroux)

- Fixed an issue where `loki.process` validation for stage `metric.counter` was
allowing invalid combination of configuration options. (@thampiotr)

Expand Down Expand Up @@ -103,41 +160,46 @@ Main (unreleased)

- Fixed a bug where UDP syslog messages were never processed (@joshuapare)

### Enhancements
- Updating configuration for `loki.write` no longer drops data. (@thepalbi)

- The `loki.write` WAL now has snappy compression enabled by default. (@thepalbi)
- Fixed a bug in WAL where exemplars were recorded before the first native histogram samples for new series,
resulting in remote write sending the exemplar first and Prometheus failing to ingest it due to missing
series. (@krajorama)

- Allow converting labels to structured metadata with Loki's structured_metadata stage. (@gonzalesraul)
- Fixed an issue in the static config converter where exporter instance values
were not being mapped when translating to flow. (@erikbaranowski)

- Improved performance of `pyroscope.scrape` component when working with a large number of targets. (@cyriltovena)
- Fix a bug which prevented Agent from running `otelcol.exporter.loadbalancing`
with a `routing_key` of `traceID`. (@ptodev)

- Added support for comma-separated list of fields in `source` option and a
new `separator` option in `drop` stage of `loki.process`. (@thampiotr)
- Added Kubernetes service resolver to static node's loadbalancing exporter
and to Flow's `otelcol.exporter.loadbalancing`. (@ptodev)

- The `loki.source.docker` component now allows connecting to Docker daemons
over HTTP(S) and setting up TLS credentials. (@tpaschalis)
### Other changes

- Added an `add_metric_suffixes` option to `otelcol.exporter.prometheus` in flow mode,
which configures whether to add type and unit suffixes to metrics names. (@mar4uk)
- Bump `mysqld_exporter` version to v0.15.0. (@marctc)

- Added an `exclude_event_message` option to `loki.source.windowsevent` in flow mode,
which excludes the human-friendly event message from Windows event logs. (@ptodev)
- Bump `github-exporter` version to 1.0.6. (@marctc)

- Improve detection of rolled log files in `loki.source.kubernetes` and
`loki.source.podlogs` (@slim-bean).
- Use Go 1.21.4 for builds. (@rfratto)

- Support clustering in `loki.source.kubernetes` (@slim-bean).
- Change User-Agent header for outbound requests to include agent-mode, goos, and deployment mode. Example `GrafanaAgent/v0.38.0 (flow; linux; docker)` (@captncraig)

- Support clustering in `loki.source.podlogs` (@rfratto).
- `loki.source.windowsevent` and `loki.source.*` changed to use a more robust positions file to prevent corruption on reboots when writing
the positions file. (@mattdurham)

- Make component list sortable in web UI. (@hainenber)
v0.37.4 (2023-11-06)
-----------------

- Adds new metrics (`mssql_server_total_memory_bytes`, `mssql_server_target_memory_bytes`,
and `mssql_available_commit_memory_bytes`) for `mssql` integration.
### Enhancements

- Azure exporter enhancements for flow and static mode, (@kgeckhart)
- Allows for pulling metrics at the Azure subscription level instead of resource by resource
- Disable dimension validation by default to reduce the number of exporter instances needed for full dimension coverage
- Added an `add_metric_suffixes` option to `otelcol.exporter.prometheus` in flow mode,
which configures whether to add type and unit suffixes to metrics names. (@mar4uk)

### Bugfixes

- Fix a bug where reloading the configuration of a `loki.write` component lead
to a panic. (@tpaschalis)

v0.37.3 (2023-10-26)
-----------------
Expand Down
49 changes: 8 additions & 41 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
# The following groups are used to refer to a changing set of users:
# The CODEOWNERS file is used to define ownership of individuals or teams
# outside of the core set of Grafana Agent maintainers.
#
# * @grafana/grafana-agent-core-maintainers: maintainers of type/core issues.
# * @grafana/grafana-agent-signals-maintainers: maintainers of type/signals issues.
# * @grafana/grafana-agent-operator-maintainers: maintainers of type/operator issues.
# * @grafana/grafana-agent-infrastructure-maintainers: maintainers of type/infrastructure issues.
#
# Other users may be listed explicitly if maintainership does not fall into one
# of the above groups.

# The default owners for everything in the repo. Unless a later match takes
# precedence, these owners are requested for review whenever someone opens a
# pull request.
* @grafana/grafana-agent-core-maintainers

# Some directories have shared ownership with the respective owners of the
# specific code for the PR being opened, so there's no CODEOWNERS.
/CHANGELOG.md
/component/all

# Binaries:
/cmd/grafana-agent-operator/ @grafana/grafana-agent-operator-maintainers
# If a directory is not listed here, it is assumed to be owned by the
# @grafana/grafana-agent-maintainers; they are not explicitly listed as
# CODEOWNERS as a GitHub project board is used instead for PR tracking, which
# helps reduce notification noise of the members of that team.

# `make docs` procedure and related workflows are owned by @jdbaldry.
/.github/workflows/publish-technical-documentation-next.yml @jdbaldry
Expand All @@ -30,25 +15,7 @@
/docs/variables.mk @jdbaldry

# Documentation:
/docs/sources/ @clayton-cornell
/docs/sources/ @clayton-cornell

# Components:
/component/discovery/ @grafana/grafana-agent-infrastructure-maintainers
/component/local/ @grafana/grafana-agent-infrastructure-maintainers
/component/loki/ @grafana/grafana-agent-signals-maintainers
/component/loki/source/podlogs/ @grafana/grafana-agent-infrastructure-maintainers
/component/mimir/rules/kubernetes/ @grafana/grafana-agent-infrastructure-maintainers
/component/otelcol/ @grafana/grafana-agent-signals-maintainers
/component/prometheus/ @grafana/grafana-agent-signals-maintainers
/component/prometheus/exporter/ @grafana/grafana-agent-infrastructure-maintainers
/component/prometheus/operator/ @grafana/grafana-agent-operator-maintainers
/component/pyroscope/ @grafana/grafana-agent-profiling-maintainers
/component/remote/ @grafana/grafana-agent-infrastructure-maintainers

# Static mode packages:
/pkg/integrations/ @grafana/grafana-agent-infrastructure-maintainers
/pkg/logs/ @grafana/grafana-agent-signals-maintainers
/pkg/metrics/ @grafana/grafana-agent-signals-maintainers
/pkg/mimir/client/ @grafana/grafana-agent-infrastructure-maintainers
/pkg/operator/ @grafana/grafana-agent-operator-maintainers
/pkg/traces/ @grafana/grafana-agent-signals-maintainers
/component/pyroscope/ @grafana/grafana-agent-profiling-maintainers
2 changes: 1 addition & 1 deletion build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM alpine:3.17 as helm
RUN apk add --no-cache helm

# Dependency: Go and Go dependencies
FROM golang:1.21.3-bullseye as golang
FROM golang:1.21.4-bullseye as golang

# Keep in sync with cmd/grafana-agent-operator/DEVELOPERS.md
ENV CONTROLLER_GEN_VERSION v0.9.2
Expand Down
2 changes: 1 addition & 1 deletion build-image/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM library/golang:1.21.3-windowsservercore-1809
FROM library/golang:1.21.4-windowsservercore-1809

SHELL ["powershell", "-command"]

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.3 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
3 changes: 2 additions & 1 deletion cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.3 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down Expand Up @@ -47,4 +47,5 @@ COPY cmd/grafana-agent/agent-local-config.yaml /etc/agent/agent.yaml


ENTRYPOINT ["/bin/grafana-agent"]
ENV AGENT_DEPLOY_MODE=docker
CMD ["--config.file=/etc/agent/agent.yaml", "--metrics.wal-directory=/etc/agent/data"]
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.30.3-windows as builder
FROM grafana/agent-build-image:0.30.4-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.3 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.30.3-windows as builder
FROM grafana/agent-build-image:0.30.4-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
4 changes: 3 additions & 1 deletion cmd/grafana-agentctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ func main() {
testLogs(),
)

_ = cmd.Execute()
if err := cmd.Execute(); err != nil {
os.Exit(1)
}
}

func configSyncCmd() *cobra.Command {
Expand Down
1 change: 1 addition & 0 deletions component/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import (
_ "github.com/grafana/agent/component/otelcol/receiver/opencensus" // Import otelcol.receiver.opencensus
_ "github.com/grafana/agent/component/otelcol/receiver/otlp" // Import otelcol.receiver.otlp
_ "github.com/grafana/agent/component/otelcol/receiver/prometheus" // Import otelcol.receiver.prometheus
_ "github.com/grafana/agent/component/otelcol/receiver/vcenter" // Import otelcol.receiver.vcenter
_ "github.com/grafana/agent/component/otelcol/receiver/zipkin" // Import otelcol.receiver.zipkin
_ "github.com/grafana/agent/component/prometheus/exporter/agent" // Import prometheus.exporter.agent
_ "github.com/grafana/agent/component/prometheus/exporter/apache" // Import prometheus.exporter.apache
Expand Down
4 changes: 2 additions & 2 deletions component/common/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/go-kit/log"
commoncfg "github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/build"
"github.com/grafana/agent/internal/useragent"
"github.com/grafana/agent/pkg/flow/logging/level"
promconfig "github.com/prometheus/common/config"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -79,7 +79,7 @@ func (args *ClientArguments) BuildRESTConfig(l log.Logger) (*rest.Config, error)
}
}

cfg.UserAgent = fmt.Sprintf("GrafanaAgent/%s", build.Version)
cfg.UserAgent = useragent.Get()
cfg.ContentType = "application/vnd.kubernetes.protobuf"

return cfg, nil
Expand Down
Loading

0 comments on commit c5c802a

Please sign in to comment.