Skip to content

Commit e14db62

Browse files
authored
chore: bump otel api to 1.27.0 and instrumentation to 0.48 (#24)
1 parent 8a85093 commit e14db62

15 files changed

+485
-551
lines changed

DEVELOPING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In the smoke-tests directory there exists a `docker-compose.yml` to run in Docke
3030
Because each example uses the same port, either comment out the other apps in the docker-compose file, or specify the app to run:
3131

3232
```bash
33-
cd smoke-tests && docker-compose up --build app-sdk-grpc
33+
cd smoke-tests && docker compose up --build app-sdk-grpc
3434
```
3535

3636
## Testing

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ smoke:
9393
@echo ""
9494
@echo "+++ Temporary Placeholder."
9595
@echo ""
96-
cd smoke-tests && docker-compose up --build app-sdk-grpc
96+
cd smoke-tests && docker compose up --build app-sdk-grpc
9797

9898
#: placeholder for smoke tests, tear down the app
9999
unsmoke:
100100
@echo ""
101101
@echo "+++ Spinning down the smokers."
102102
@echo ""
103-
cd smoke-tests && docker-compose down --volumes
103+
cd smoke-tests && docker compose down --volumes
104104

105105
EXAMPLE_SERVICE_NAME ?= otel-python-example
106106
run_example: export OTEL_SERVICE_NAME := $(EXAMPLE_SERVICE_NAME)

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ We have the HONEYCOMB_API_ENDPOINT set to an OpenTelemetry Collector. This can b
3232
Because each example uses the same port, either comment out the other apps in the docker-compose file, or specify the app and protocol to run:
3333

3434
```bash
35-
cd smoke-tests && docker-compose up --build app-sdk-grpc
35+
cd smoke-tests && docker compose up --build app-sdk-grpc
3636
```

examples/hello-world-django/pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ readme = "README.md"
99
python = "^3.11"
1010
django = "^5.0.1"
1111
hyperdx-opentelemetry = {path = "../../", develop = true}
12-
opentelemetry-api = "1.22.0"
13-
opentelemetry-instrumentation = "0.43b0"
12+
opentelemetry-api = "1.27.0"
13+
opentelemetry-instrumentation = "0.48b0"
1414

1515
[build-system]
1616
requires = ["poetry-core"]

examples/hello-world-flask/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# to be run with docker-compose in smoke-tests directory
1+
# to be run with docker compose in smoke-tests directory
22
FROM python:3.10-slim
33

44
WORKDIR /app

examples/hello-world-flask/pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ python = "^3.10"
1010
flask = "2.2.5"
1111
Werkzeug = "2.2.2"
1212
hyperdx-opentelemetry = {path = "../../", develop = true}
13-
opentelemetry-api = "1.22.0"
14-
opentelemetry-instrumentation-flask = "0.43b0"
13+
opentelemetry-api = "1.27.0"
14+
opentelemetry-instrumentation-flask = "0.48b0"
1515

1616
[build-system]
1717
requires = ["poetry-core"]

examples/hello-world/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# to be run with docker-compose in smoke-tests directory
1+
# to be run with docker compose in smoke-tests directory
22
FROM python:3.10-slim
33

44
WORKDIR /app
@@ -25,4 +25,4 @@ RUN cd ./examples/hello-world && poetry install
2525

2626
# From this point forward, we're operating on the example app.
2727
WORKDIR /app/examples/hello-world
28-
CMD ["python", "app.py"]
28+
CMD ["python", "app.py"]

examples/hello-world/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
[tool.poetry.dependencies]
99
python = "^3.10"
1010
hyperdx-opentelemetry = {path = "../../", develop = true}
11-
opentelemetry-api = "1.22.0"
11+
opentelemetry-api = "1.27.0"
1212

1313
[build-system]
1414
requires = ["poetry-core"]

poetry.lock

+444-510
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[tool.poetry]
22
name = "hyperdx-opentelemetry"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "HyperDX OpenTelemetry Distro for Python"
55
authors = ["HyperDX <[email protected]>"]
66
readme = "README.md"
77
packages = [{include = "hyperdx", from = "src" }]
88

99
[tool.poetry.dependencies]
10-
python = "^3.7, >= 3.7.2"
11-
opentelemetry-api = "1.22.0"
12-
opentelemetry-sdk = "1.22.0"
13-
opentelemetry-exporter-otlp = "1.22.0"
14-
opentelemetry-instrumentation = "0.43b0"
10+
python = ">= 3.8"
11+
opentelemetry-api = "1.27.0"
12+
opentelemetry-sdk = "1.27.0"
13+
opentelemetry-exporter-otlp = "1.27.0"
14+
opentelemetry-instrumentation = "0.48b0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
coverage = ">=6.5,<8.0"

smoke-tests/smoke-sdk-grpc-flask.bats

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TRACER_NAME="hello_world_flask_tracer"
99
METER_NAME="hello_world_flask_meter"
1010

1111
setup_file() {
12-
docker-compose up --build --detach collector ${CONTAINER_NAME}
12+
docker compose up --build --detach collector ${CONTAINER_NAME}
1313
wait_for_ready_app ${CONTAINER_NAME}
1414
curl --silent localhost:5000
1515
wait_for_traces
@@ -18,16 +18,16 @@ setup_file() {
1818

1919
teardown_file() {
2020
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
21-
docker-compose stop ${CONTAINER_NAME}
22-
docker-compose restart collector
21+
docker compose stop ${CONTAINER_NAME}
22+
docker compose restart collector
2323
wait_for_flush
2424
}
2525

2626
# TESTS
2727

2828
@test "Auto instrumentation produces a flask span" {
2929
result=$(span_names_for "opentelemetry.instrumentation.flask")
30-
assert_equal "$result" '"/"'
30+
assert_equal "$result" '"GET /"'
3131
}
3232

3333
@test "Manual instrumentation produces parent and child spans with names of spans" {
@@ -49,4 +49,4 @@ teardown_file() {
4949
@test "Manual instrumentation produces metrics" {
5050
result=$(metric_names_for ${METER_NAME})
5151
assert_equal "$result" '"bee_counter"'
52-
}
52+
}

smoke-tests/smoke-sdk-grpc.bats

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ METER_NAME="hello_world_meter"
1010

1111
setup_file() {
1212
echo "# 🚧" >&3
13-
docker-compose up --build --detach collector
13+
docker compose up --build --detach collector
1414
wait_for_ready_collector ${COLLECTOR_NAME}
15-
docker-compose up --build --detach ${CONTAINER_NAME}
15+
docker compose up --build --detach ${CONTAINER_NAME}
1616
wait_for_traces
1717
wait_for_metrics
1818
}
1919

2020
teardown_file() {
2121
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
22-
docker-compose stop ${CONTAINER_NAME}
23-
docker-compose restart collector
22+
docker compose stop ${CONTAINER_NAME}
23+
docker compose restart collector
2424
wait_for_flush
2525
}
2626

@@ -45,4 +45,4 @@ teardown_file() {
4545
@test "Manual instrumentation produces metrics" {
4646
result=$(metric_names_for ${METER_NAME})
4747
assert_equal "$result" '"sheep"'
48-
}
48+
}

smoke-tests/smoke-sdk-http-flask.bats

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TRACER_NAME="hello_world_flask_tracer"
99
METER_NAME="hello_world_flask_meter"
1010

1111
setup_file() {
12-
docker-compose up --build --detach collector ${CONTAINER_NAME}
12+
docker compose up --build --detach collector ${CONTAINER_NAME}
1313
wait_for_ready_app ${CONTAINER_NAME}
1414
curl --silent localhost:5000
1515
wait_for_traces
@@ -18,16 +18,16 @@ setup_file() {
1818

1919
teardown_file() {
2020
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
21-
docker-compose stop ${CONTAINER_NAME}
22-
docker-compose restart collector
21+
docker compose stop ${CONTAINER_NAME}
22+
docker compose restart collector
2323
wait_for_flush
2424
}
2525

2626
# TESTS
2727

2828
@test "Auto instrumentation produces a flask span" {
2929
result=$(span_names_for "opentelemetry.instrumentation.flask")
30-
assert_equal "$result" '"/"'
30+
assert_equal "$result" '"GET /"'
3131
}
3232

3333
@test "Manual instrumentation produces parent and child spans with names of spans" {
@@ -49,4 +49,4 @@ teardown_file() {
4949
@test "Manual instrumentation produces metrics" {
5050
result=$(metric_names_for ${METER_NAME})
5151
assert_equal "$result" '"bee_counter"'
52-
}
52+
}

smoke-tests/smoke-sdk-http.bats

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ METER_NAME="hello_world_meter"
1010

1111
setup_file() {
1212
echo "# 🚧" >&3
13-
docker-compose up --build --detach collector
13+
docker compose up --build --detach collector
1414
wait_for_ready_collector ${COLLECTOR_NAME}
15-
docker-compose up --build --detach ${CONTAINER_NAME}
15+
docker compose up --build --detach ${CONTAINER_NAME}
1616
wait_for_traces
1717
wait_for_metrics
1818
}
1919

2020
teardown_file() {
2121
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
22-
docker-compose stop ${CONTAINER_NAME}
23-
docker-compose restart collector
22+
docker compose stop ${CONTAINER_NAME}
23+
docker compose restart collector
2424
wait_for_flush
2525
}
2626

@@ -45,4 +45,4 @@ teardown_file() {
4545
@test "Manual instrumentation produces metrics" {
4646
result=$(metric_names_for ${METER_NAME})
4747
assert_equal "$result" '"sheep"'
48-
}
48+
}

smoke-tests/test_helpers/utilities.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ wait_for_ready_collector() {
100100
MAX_RETRIES=10
101101
echo -n "# 🍿 Setting up ${COLLECTOR}" >&3
102102
NEXT_WAIT_TIME=0
103-
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker-compose logs ${COLLECTOR} | grep "Everything is ready. Begin running and processing data.") ]]
103+
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker compose logs ${COLLECTOR} | grep "Everything is ready. Begin running and processing data.") ]]
104104
do
105105
echo -n " ... $(( NEXT_WAIT_TIME++ ))s" >&3
106106
sleep $NEXT_WAIT_TIME
@@ -118,7 +118,7 @@ wait_for_ready_app() {
118118
MAX_RETRIES=10
119119
echo -n "# 🍿 Setting up ${CONTAINER}" >&3
120120
NEXT_WAIT_TIME=0
121-
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker-compose logs ${CONTAINER} | grep "Running on http:") ]]
121+
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker compose logs ${CONTAINER} | grep "Running on http:") ]]
122122
do
123123
echo -n " ... $(( NEXT_WAIT_TIME++ ))s" >&3
124124
sleep $NEXT_WAIT_TIME
@@ -143,4 +143,4 @@ assert_equal() {
143143
} >&2 # output error to STDERR
144144
return 1
145145
fi
146-
}
146+
}

0 commit comments

Comments
 (0)