Skip to content

Commit

Permalink
main merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed May 9, 2024
2 parents 5ef0d4f + 9348743 commit e3e0137
Show file tree
Hide file tree
Showing 160 changed files with 382 additions and 79 deletions.
62 changes: 31 additions & 31 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch --driver docker-container --use
- docker buildx build --build-arg="GO_RUNTIME=golang:1.22.1-bullseye" --push --platform
- docker buildx build --build-arg="GO_RUNTIME=golang:1.22.3-bullseye" --push --platform
linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image
environment:
DOCKER_LOGIN:
Expand Down Expand Up @@ -44,7 +44,7 @@ steps:
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch --driver docker-container --use
- docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.1-bullseye"
- docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.3-bullseye"
--push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG
./tools/build-image
environment:
Expand Down Expand Up @@ -110,7 +110,7 @@ steps:
- commands:
- apt-get update -y && apt-get install -y libsystemd-dev
- make lint
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Lint
trigger:
event:
Expand All @@ -125,7 +125,7 @@ platform:
steps:
- commands:
- make GO_TAGS="nodocker" test
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Run Go tests
trigger:
event:
Expand All @@ -140,7 +140,7 @@ platform:
steps:
- commands:
- K8S_USE_DOCKER_NETWORK=1 make test
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Run Go tests
volumes:
- name: docker
Expand All @@ -163,7 +163,7 @@ platform:
steps:
- commands:
- go test -tags="nodocker,nonetwork" ./...
image: grafana/alloy-build-image:v0.1.0-windows
image: grafana/alloy-build-image:v0.1.1-windows
name: Run Go tests
trigger:
ref:
Expand All @@ -178,7 +178,7 @@ platform:
steps:
- commands:
- make alloy-image
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build container
volumes:
- name: docker
Expand All @@ -204,7 +204,7 @@ platform:
steps:
- commands:
- '& "C:/Program Files/git/bin/bash.exe" -c "make alloy-image-windows"'
image: grafana/alloy-build-image:v0.1.0-windows
image: grafana/alloy-build-image:v0.1.1-windows
name: Build container
volumes:
- name: docker
Expand All @@ -231,7 +231,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM=
make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -248,7 +248,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM=
make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -265,7 +265,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM=
make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -282,7 +282,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM=
make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -298,7 +298,7 @@ steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -314,7 +314,7 @@ steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -330,7 +330,7 @@ steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -346,7 +346,7 @@ steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make alloy
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Build
trigger:
event:
Expand All @@ -363,7 +363,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM=
GOEXPERIMENT=boringcrypto make alloy
image: grafana/alloy-build-image:v0.1.0-boringcrypto
image: grafana/alloy-build-image:v0.1.1-boringcrypto
name: Build
trigger:
event:
Expand All @@ -380,7 +380,7 @@ steps:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM=
GOEXPERIMENT=boringcrypto make alloy
image: grafana/alloy-build-image:v0.1.0-boringcrypto
image: grafana/alloy-build-image:v0.1.1-boringcrypto
name: Build
trigger:
event:
Expand All @@ -396,7 +396,7 @@ steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Configure QEMU
volumes:
- name: docker
Expand All @@ -416,7 +416,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Publish container
volumes:
- name: docker
Expand All @@ -439,7 +439,7 @@ steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Configure QEMU
volumes:
- name: docker
Expand All @@ -459,7 +459,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Publish container
volumes:
- name: docker
Expand Down Expand Up @@ -493,7 +493,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0-windows
image: grafana/alloy-build-image:v0.1.1-windows
name: Build containers
volumes:
- name: docker
Expand All @@ -516,7 +516,7 @@ steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Configure QEMU
volumes:
- name: docker
Expand All @@ -536,7 +536,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Publish container
volumes:
- name: docker
Expand All @@ -559,7 +559,7 @@ steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Configure QEMU
volumes:
- name: docker
Expand All @@ -579,7 +579,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Publish container
volumes:
- name: docker
Expand Down Expand Up @@ -613,7 +613,7 @@ steps:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/alloy-build-image:v0.1.0-windows
image: grafana/alloy-build-image:v0.1.1-windows
name: Build containers
volumes:
- name: docker
Expand Down Expand Up @@ -714,7 +714,7 @@ steps:
from_secret: gpg_private_key
GPG_PUBLIC_KEY:
from_secret: gpg_public_key
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Publish release
volumes:
- name: docker
Expand All @@ -737,7 +737,7 @@ steps:
- commands:
- DOCKER_OPTS="" make dist/alloy-linux-amd64
- DOCKER_OPTS="" make test-packages
image: grafana/alloy-build-image:v0.1.0
image: grafana/alloy-build-image:v0.1.1
name: Test Linux system packages
volumes:
- name: docker
Expand Down Expand Up @@ -835,6 +835,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: 1cf3dfdb523c1cf8113b49cc8f69a10f714dac0ffc00c02826c36e7d3b9d94b1
hmac: edfc9eabaa8e7af503b548fca203b5e7491258cbf778e172db3fc0cdd23ac3d4

...
4 changes: 2 additions & 2 deletions .drone/pipelines/build_images.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local locals = {
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',
'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes',
'docker buildx create --name multiarch --driver docker-container --use',
'docker buildx build --build-arg="GO_RUNTIME=golang:1.22.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image',
'docker buildx build --build-arg="GO_RUNTIME=golang:1.22.3-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image',
],
}],
volumes: [{
Expand All @@ -55,7 +55,7 @@ local locals = {
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',
'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes',
'docker buildx create --name multiarch --driver docker-container --use',
'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.1-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image',
'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.3-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/alloy-build-image:$IMAGE_TAG ./tools/build-image',
],
}],
volumes: [{
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-linux-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
push: false
tags: grafana/alloy-build-image:latest
build-args: |
GO_RUNTIME=golang:1.22.1-bullseye
GO_RUNTIME=golang:1.22.3-bullseye
- name: Create test Linux build image for boring crypto
uses: docker/build-push-action@v5
Expand All @@ -34,4 +34,4 @@ jobs:
push: false
tags: grafana/alloy-build-image:latest
build-args: |
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.1-bullseye
GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22.3-bullseye
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ v1.1.0-rc.0
- Fix a bug where custom components would not shadow the stdlib. If you have a module whose name conflicts with an stdlib function
and if you use this exact function in your config, then you will need to rename your module. (@wildum)

- Fix an issue where `loki.source.docker` stops collecting logs after a container restart. (@wildum)

- Upgrading `pyroscope/ebpf` from 0.4.6 to 0.4.7 (@korniltsev):
* detect libc version properly when libc file name is libc-2.31.so and not libc.so.6
* treat elf files with short build id (8 bytes) properly

### Other changes

- Update `alloy-mixin` to use more specific alert group names (for example,
Expand Down Expand Up @@ -155,6 +161,8 @@ v1.1.0-rc.0
- `otelcol.processor.resourcedetection`: Update to ec2 scraper so that core attributes are not dropped if describeTags returns an error (likely due to permissions).
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30672

- Use Go 1.22.3 for builds. (@kminehart)

v1.0.0
------

Expand Down
5 changes: 4 additions & 1 deletion 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/alloy-build-image:v0.1.0 as build
FROM --platform=$BUILDPLATFORM grafana/alloy-build-image:v0.1.1 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down Expand Up @@ -48,6 +48,9 @@ COPY --from=build /src/alloy/build/alloy /bin/alloy
COPY example-config.alloy /etc/alloy/config.alloy

# Create alloy user in container, but do not set it as default
#
# NOTE(rfratto): non-root support in Docker containers is an experimental,
# undocumented feature; use at your own risk.
RUN groupadd --gid $UID $USERNAME
RUN useradd -m -u $UID -g $UID $USERNAME
RUN chown -R $USERNAME:$USERNAME /etc/alloy
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/alloy-build-image:v0.1.0-windows as builder
FROM grafana/alloy-build-image:v0.1.1-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1
ARG GO_TAGS
Expand All @@ -15,7 +15,7 @@ RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERS
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS=\"builtinassets ${GO_TAGS}\" make alloy""
# In this case, we're separating the clean command from make alloy to avoid an issue where access to some mod cache
# files is denied immediately after make alloy, for example:
# "go: remove C:\go\pkg\mod\golang.org\[email protected].1.windows-amd64\bin\go.exe: Access is denied."
# "go: remove C:\go\pkg\mod\golang.org\[email protected].3.windows-amd64\bin\go.exe: Access is denied."
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache""

# Use the smallest container possible for the final image
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include docs.mk
docs: check-cloudwatch-integration

check-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.1-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/reference/components/prometheus.exporter.cloudwatch.md
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.3-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/reference/components/prometheus.exporter.cloudwatch.md

generate-cloudwatch-integration:
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.1-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go generate
$(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.22.3-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go generate
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ information.

## Debug metrics

* `processor_batch_batch_send_size_bytes` (histogram): Number of bytes in batch that was sent.
* `processor_batch_batch_send_size_ratio` (histogram): Number of units in the batch.
* `processor_batch_metadata_cardinality_ratio` (gauge): Number of distinct metadata value combinations being processed.
* `processor_batch_timeout_trigger_send_ratio_total` (counter): Number of times the batch was sent due to a timeout trigger.
Expand Down
Loading

0 comments on commit e3e0137

Please sign in to comment.