mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 17:14:05 -08:00
ad4f514e66
* Add OTLP Ingestion endpoint We copy files from the otel-collector-contrib. See the README in `storage/remote/otlptranslator/README.md`. This supersedes: https://github.com/prometheus/prometheus/pull/11965 Signed-off-by: gouthamve <gouthamve@gmail.com> * Return a 200 OK It is what the OTEL Golang SDK expect :( https://github.com/open-telemetry/opentelemetry-go/issues/4363 Signed-off-by: Goutham <gouthamve@gmail.com> --------- Signed-off-by: gouthamve <gouthamve@gmail.com> Signed-off-by: Goutham <gouthamve@gmail.com>
16 lines
624 B
Bash
Executable file
16 lines
624 B
Bash
Executable file
#!/bin/bash
|
|
|
|
OTEL_VERSION=v0.81.0
|
|
|
|
git clone https://github.com/open-telemetry/opentelemetry-collector-contrib ./tmp
|
|
cd ./tmp
|
|
git checkout $OTEL_VERSION
|
|
cd ..
|
|
rm -rf ./prometheusremotewrite/*
|
|
cp -r ./tmp/pkg/translator/prometheusremotewrite/*.go ./prometheusremotewrite
|
|
rm -rf ./prometheusremotewrite/*_test.go
|
|
rm -rf ./tmp
|
|
|
|
sed -i '' 's#github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus#github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheus#g' ./prometheusremotewrite/*.go
|
|
sed -i '' '1s#^#// DO NOT EDIT. COPIED AS-IS. SEE README.md\n\n#g' ./prometheusremotewrite/*.go
|