forked from grafana/mimir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OTLP: Use optimized OTel metric translator, converting directly to Mi…
…mir format (grafana#7957) * Use optimized OTLP translator, converting directly to Mimir format --------- Signed-off-by: Arve Knudsen <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,423 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ RUN GO111MODULE=on \ | |
go install github.com/google/go-jsonnet/cmd/[email protected] && \ | ||
go install github.com/norwoodj/helm-docs/cmd/[email protected] && \ | ||
go install github.com/open-policy-agent/[email protected] && \ | ||
go install github.com/uber-go/[email protected] && \ | ||
rm -rf /go/pkg /go/src /root/.cache | ||
|
||
COPY --from=helm /usr/bin/helm /usr/bin/helm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
set -euo pipefail | ||
|
||
# Use GNU sed on MacOS falling back to `sed` everywhere else | ||
SED=$(which gsed || which sed) | ||
|
||
FILES=$(find ../../../vendor/github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheusremotewrite -name '*.go' ! -name timeseries.go ! -name "*_test.go") | ||
|
||
for SRC in $FILES | ||
do | ||
BASENAME=$(basename "$SRC") | ||
DST="${BASENAME%%.go}_generated.go" | ||
|
||
rm -f "$DST" | ||
echo "Processing $SRC to $DST" | ||
printf "// Code generated from Prometheus sources - DO NOT EDIT.\n\n" >"$DST" | ||
cat "$SRC" >> "$DST" | ||
|
||
gopatch -p mimirpb.patch "$DST" | ||
|
||
$SED -i "s/PrometheusConverter/MimirConverter/g" "$DST" | ||
$SED -i "s/Prometheus remote write format/Mimir remote write format/g" "$DST" | ||
goimports -w -local github.com/grafana/mimir "$DST" | ||
done |
Oops, something went wrong.