Skip to content

Commit 66b507d

Browse files
authored
Cleanup outdated python workarounds (#419)
* Remove outdated exporter env var workarounds for python * Drop outdated requirements entries for python * Modify upstream otel-instrument script inplace instead of providing our own wrapper wrapper * Typo in python build script
1 parent b9aa541 commit 66b507d

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

python/build-layer.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@ sed -i 's/0.54b1/0.53b1/g' nodeps-requirements.txt
1414
sed -i 's/0.54b1/0.53b1/g' requirements.txt
1515
sed -i 's/1.33.1/1.32.1/g' requirements.txt
1616
sed -i 's/^docker run --rm/docker run/g' ../../build.sh
17-
# sed -i 's/opentelemetry-instrument/splunk-py-trace/g' otel-instrument
18-
# FIXME this recently broke and why aren't these a vendored part of pkg_resources anymore? perhaps we should remove the dependency on pkg_resources?
19-
echo "packaging" >> requirements.txt
20-
echo "jaraco.text" >> requirements.txt
21-
echo "importlib-resources" >> requirements.txt
22-
echo "platformdirs" >> requirements.txt
23-
echo "Modified python wrapper requirements:"
24-
cat requirements.txt
17+
sed -i '2isource /opt/splunk-default-config' otel-instrument
18+
2519
cd ../..
2620

2721
# FIXME no good way to specify python version requirement to pip; use 3.8 runtime/setuptools image
@@ -38,13 +32,11 @@ rm -rf build
3832
cd $DISTRO_DIR
3933
docker cp "$(docker ps --all | grep aws-otel-lambda-python-layer | cut -d' ' -f1 | head -1)":/out/opentelemetry-python-layer.zip ./layer.zip
4034
unzip -qo layer.zip && rm layer.zip
41-
mv otel-instrument otel-instrument-upstream
4235

4336
popd
4437

4538
echo "Preparing Splunk layer"
4639
# copy Splunk scripts (delegating to OTEL ones)
47-
cp otel-instrument $OTEL_PYTHON_DIR/$DISTRO_DIR/
4840
cp ../scripts/* $OTEL_PYTHON_DIR/$DISTRO_DIR/
4941
cp -r ./src/* $OTEL_PYTHON_DIR/$DISTRO_DIR/python/
5042
cd $OTEL_PYTHON_DIR/$DISTRO_DIR

python/otel-instrument

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)