Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
cd6059a
feat(OTel): Initial commit to migrate to OpenTelemetry.
pvital Mar 14, 2024
d27de2b
test(OTel): Remove opentracing tests and disable tests.
pvital Mar 21, 2024
f285f84
ci(OTel): Adapt CircleCI to OTel and set to run only on master branch.
pvital Mar 21, 2024
585dd56
refactor(span): Span and SpanContext migration to use OTel.
GSVarsha Mar 25, 2024
c937148
feat(OTel): Remove dependency of basictracer.
pvital Mar 17, 2024
193a2dc
style: Format recorder.py and test_host_collector.py, and fix lint vi…
pvital Mar 17, 2024
0f5d0fa
feat(OTel): Add Sampler abstract class and adapt InstanaSampler class.
pvital Mar 28, 2024
c3877cf
refactor(tracer): Tracer migration to use OTel.
pvital Mar 28, 2024
808ef70
style: format singletons.py, tracer.py and tests/helpers.py
pvital Mar 28, 2024
384be66
fix: handle circular imports caused by singletons.env_is_test
GSVarsha Apr 2, 2024
8a4afb0
feat(OTel): Enhance SpanContext and tracing utilities.
GSVarsha Apr 4, 2024
0f9cb80
feat(OTel): Enhance Tracer classes.
pvital Apr 8, 2024
c89fd9d
refactor: Tracer and Span ID generation.
pvital Apr 10, 2024
6c22d20
test(OTel): Disable auto instrumentation.
pvital Apr 10, 2024
ef6bd51
fix(test): Skip test_stan_recorder.py on macOS.
pvital Apr 10, 2024
05cdad5
style: format conftest.py
pvital Apr 10, 2024
d44d6f0
refactor: test_id_management.py to handle int IDs.
pvital Apr 10, 2024
339a400
test(OTel): Add TracerProvider and Tracer tests.
pvital Apr 10, 2024
ee5b63e
style: collector files
pvital Apr 11, 2024
5ba7358
test(OTel): Add tests for SpanContext and Event classes.
pvital Apr 18, 2024
fb0d188
tests(OTel): Add tests for InstanaSpan, BaseSpan, SDKSpan and Registe…
pvital Apr 29, 2024
62e6301
adapt get_current_span(), get_active_tracer() & get_tracer_tuple() to…
GSVarsha Jul 4, 2024
b114037
adapt inject and extract to OTel
GSVarsha Jul 4, 2024
4c29b8c
adapt traceparent, tracestate to OTel
GSVarsha Jul 4, 2024
f254a6d
feat: Add CarrierT type to BasePropagator.
pvital Jul 4, 2024
b67edce
fix: Import of gc in collector/helpers/runtime.py
pvital Jul 4, 2024
8e7891c
fix(tests): Add pytest-mock as test requirement.
pvital Jul 4, 2024
696cf7c
ci(OTel): Remove Cassandra, Couchbase and Gevent tests
pvital Jul 4, 2024
c937dae
fix: Record Spans during closing.
pvital Jul 9, 2024
b196b3c
refactor: Instana's Span structure.
pvital Jul 9, 2024
9a4305d
fix(tests): Adapt unit tests after Span structure refactor.
pvital Jul 14, 2024
b3ff7bd
fix: add stack to readable_span
GSVarsha Jul 19, 2024
0743218
fix: calculate and add duration to readable_span
GSVarsha Jul 19, 2024
3340c32
fix(tests): Adapt unit tests to span.duration changes
GSVarsha Jul 19, 2024
1fa7755
fix: span_context changes
GSVarsha Jul 19, 2024
572c0f6
fix(tests): Adapt unittests to span context changes
GSVarsha Jul 19, 2024
fcbeb19
style: Update type hints.
pvital Jul 21, 2024
fd651da
fix(tests): Add Span duration unit tests.
pvital Jul 21, 2024
e50cbf2
fix: use the ENUM class for intermediate span as well
GSVarsha Jul 22, 2024
0b3a572
fix(tests): Adapt registered_span unit tests after span.k refactor
GSVarsha Jul 22, 2024
0184d0c
fix: Report data to Agent
GSVarsha Jul 22, 2024
4658f07
minor fixes
GSVarsha Jul 22, 2024
2fd9f1e
instrumentation(logging): Adapt to OTel spec
GSVarsha Jul 15, 2024
cb47e4a
test(logging): Adapt unit tests after logging instrumentation refactor
GSVarsha Jul 15, 2024
c7c5586
fix(logging): refactor instrumantation after span context changes
GSVarsha Jul 23, 2024
475e4c0
fix(tests): Adapt unit tests to span.kind changes
GSVarsha Jul 23, 2024
9eb14c4
tests(logging): Add tests to increase coverage
GSVarsha Jul 24, 2024
daf3f1d
tests(logging): use py std assert statements
GSVarsha Jul 24, 2024
cde4a93
fix(style): Add type hints
GSVarsha Jul 24, 2024
25f6e3a
fix: TracerProvider.get_tracer() after API update.
pvital Jul 25, 2024
78477a1
fix: log message
GSVarsha Jul 29, 2024
5b62118
fix: different traces' trace id within a session
GSVarsha Jul 30, 2024
1e5076e
fix(tests): Remove tracer_id from tests
GSVarsha Jul 30, 2024
230963d
fix: Add tests for root span context
GSVarsha Jul 30, 2024
a1fc148
instrumentation(flask): add logic to set the implicit current context…
GSVarsha Jul 4, 2024
785efa9
instrumentation(flask): Adapt common to OTel spec
GSVarsha Jul 9, 2024
f88db53
instrumentation(flask): Adapt with_blinker to OTel spec
GSVarsha Jul 9, 2024
7edbd41
instrumentation(flask): end the span only if it is recording
GSVarsha Jul 10, 2024
1c90756
instrumentation(flask): vanilla
GSVarsha Jul 10, 2024
fe8971b
fix: receive span_context as arg in start_span(), start_as_current_sp…
GSVarsha Jul 25, 2024
aa0123b
fix(flask_app): Adapt to OTel spec
GSVarsha Jul 25, 2024
de67877
tests(flask): Adapt unit tests to OTel spec
GSVarsha Jul 25, 2024
d776f4e
fix(vanilla): receive span_context as arg in start_span()
GSVarsha Jul 26, 2024
3ca2909
style(with_blinker): Add type hints
GSVarsha Jul 26, 2024
4f3cc84
tests(flask): Add tests to increase coverage
GSVarsha Jul 26, 2024
26e6b8c
tests(flask): use py std assert statements
GSVarsha Jul 26, 2024
fc5713d
style: fix import statements
GSVarsha Jul 26, 2024
75a76ca
fix(tests): add tests to handle `got_request_exception` signal
GSVarsha Jul 26, 2024
7a520d9
fix: fix deprecation warning
GSVarsha Jul 26, 2024
93d6baa
style: Add typehints
GSVarsha Jul 29, 2024
1b20e47
fix(tests): fetch log msg from data["log"]
GSVarsha Jul 29, 2024
1be912a
fix: Add sem-conv to requirements file
GSVarsha Jul 31, 2024
c07fd97
fix: modify stmts with `is not None`
GSVarsha Jul 31, 2024
415d130
style: TypeHint fixes
GSVarsha Jul 31, 2024
9833870
added unittest for readable span
CagriYonca Jul 31, 2024
a05acab
changed test folder structure
CagriYonca Jul 31, 2024
16b8326
fix(tests): Add pytest-mock as test requirement.
pvital Jul 4, 2024
3aff66c
fix: Remove not necessary async_tracer and tornado_tracer.
pvital Mar 21, 2024
3d81697
style: add type hints in the traceutils.py file.
pvital May 27, 2024
3652b8e
refactor: urllib3 instrumentation.
pvital May 27, 2024
4e4e47d
fix(urllib3): pass the parent span context to start_as_current_span()
GSVarsha Jul 22, 2024
aafd00d
style: format instrumentation/urllib3.py
pvital Jul 9, 2024
db7c82e
tests(urllib3): adapt tests to OTel usage.
pvital Aug 1, 2024
c893084
chore: Advanced exclusion from coverage.py
pvital Aug 5, 2024
5bf2cd5
test(OTel): enable instrumentation tests.
pvital Aug 1, 2024
0fa0d03
fix: context propagation in nested spans
GSVarsha Aug 19, 2024
091090e
refactor(instrumentation): wsgi
GSVarsha Aug 12, 2024
307d8ea
wsgi: Add Bottle app
GSVarsha Aug 12, 2024
e4329f7
wsgi: Adapt tests to middleware and bottle
GSVarsha Aug 12, 2024
4f1bce8
refactor(tests): use python standard assert stmts
GSVarsha Aug 12, 2024
7180c31
style: Add TypeHints, fix imports
GSVarsha Aug 16, 2024
b9c05d1
wsgi: enable tests after refactor
GSVarsha Aug 16, 2024
e32ada1
refactor(tests): modify port names for flask and wsgi tests
GSVarsha Aug 16, 2024
81fc1e4
tests: Add legacy-cgi as requirement for bottle_wsgi in py 3.13
GSVarsha Aug 16, 2024
2dcf60d
wsgi: minor fixes
GSVarsha Aug 19, 2024
b2cc66d
refactor: ASGI instrumentation
pvital Aug 12, 2024
b0982b4
refactor: Starlette instrumentation.
pvital Aug 12, 2024
91f383f
tests(asgi+starlette): adapt tests to OTel usage.
pvital Aug 12, 2024
41c124a
implementation: added opentelemetry support and related unittests
CagriYonca Aug 7, 2024
68ae3d3
fix: removed procedure if exists
CagriYonca Aug 7, 2024
450e659
fix: updated postgres version used in circle ci
CagriYonca Aug 7, 2024
fa59b88
fix: fixed pytest errors for python 3.10-11-12
CagriYonca Aug 8, 2024
d070ddf
fix: updated conftest.py to ignore pep0249 in python3.13
CagriYonca Aug 8, 2024
8b2fd40
fix: changed parameter from str to int
CagriYonca Aug 8, 2024
052e176
fix: renamed setup function, added span context parameter to tracer
CagriYonca Aug 12, 2024
acc9518
fix: changed span kind
CagriYonca Aug 13, 2024
70fbbac
fix: changed span.kind unittest
CagriYonca Aug 13, 2024
6300c60
fix: added type hints and return types
CagriYonca Aug 15, 2024
c92c95c
update: updated type annotations
CagriYonca Aug 19, 2024
a472ee5
update: updated setup function
CagriYonca Aug 19, 2024
79414e4
fix: type annotations has been fixed
CagriYonca Aug 19, 2024
09b6269
update: added reset_table and reset_procedure functions
CagriYonca Aug 20, 2024
74ede7e
update: updated connection params
CagriYonca Aug 20, 2024
450b0d6
fix: removed unnecessary patch block
CagriYonca Aug 22, 2024
8dd13b5
django: refactor instrumentation
GSVarsha Aug 20, 2024
8336051
django: Adapt tests after refactor
GSVarsha Aug 20, 2024
f485f51
tests(django): increase coverage
GSVarsha Aug 22, 2024
1c30c8c
sdk_span: Add OTel SpanKind to entry and exit kind
GSVarsha Aug 23, 2024
3f7b8e5
style(django): Add style changes
GSVarsha Aug 23, 2024
6ad1f94
fix: Update SpanAttributes in ASGI instrumentation
pvital Aug 21, 2024
15dcdef
refactor: FastAPI instrumentation.
pvital Aug 20, 2024
b4f0220
tests(fastapi): adapt tests to OTel usage.
pvital Aug 20, 2024
ca3eda2
fix: handle suppression
GSVarsha Aug 26, 2024
2477bcc
fix: test_non_async_simple
GSVarsha Aug 26, 2024
01601e1
fix: starlette import error
GSVarsha Aug 28, 2024
0898d3b
fix(circleci): exclude google cloud jobs till the instrumentation is …
GSVarsha Aug 28, 2024
9f8fcd5
fix: Flaky test in urllib3
GSVarsha Aug 28, 2024
230baef
boto3: refactor instrumentation
GSVarsha Aug 21, 2024
32d14bd
boto3: refactor tests
GSVarsha Aug 22, 2024
e824bf7
boto3: Add typehints to method signature
GSVarsha Aug 30, 2024
8255cf4
boto3: Add style changes
GSVarsha Aug 30, 2024
db60342
style: format conftest.py
pvital Apr 10, 2024
2a10cbb
fix(tests): Adapt unit tests after Span structure refactor.
pvital Jul 14, 2024
d69f8e7
feature: added psycopg2 implementation
CagriYonca Aug 21, 2024
8637bde
update: added typing annotations
CagriYonca Aug 26, 2024
6e4a051
fix: fixed assertions
CagriYonca Aug 28, 2024
f4eae64
imported pep0249 to instrumentation
CagriYonca Aug 28, 2024
b7fe904
update: updated typing annotations
CagriYonca Aug 30, 2024
6762c76
fix: Adapt logging tests to OTel after rebase.
pvital Sep 2, 2024
f77197f
tests(logging): Refactor to pure pytest UT.
pvital Sep 2, 2024
c6e742f
fix: refactor of unittests
CagriYonca Sep 4, 2024
8f9d896
refactor(pymysql): added instrumentation of pymysql
CagriYonca Sep 3, 2024
30fa801
unittests(pymysql): added refactor of unittests
CagriYonca Sep 3, 2024
89b548a
refactor(mysqlclient): added instrumentation of mysqlclient
CagriYonca Sep 3, 2024
ec26359
unittest(mysqlclient): added unittests and typing annotations
CagriYonca Sep 3, 2024
2e8a375
refactor(pymongo): added otel instrumentation of pymongo
CagriYonca Sep 3, 2024
a0c9ecb
unittests(pymongo): added unittests for instrumentation
CagriYonca Sep 3, 2024
885cb10
refactor: Asyncio instrumentation
pvital Aug 28, 2024
7df0d86
refactor: AIOHTTP server and client instrumentation
pvital Aug 23, 2024
74745a0
tests(asyncio): adapt tests to OTel usage.
pvital Aug 28, 2024
2b4a16f
tests(aiohttp): adapt tests to OTel usage.
pvital Aug 23, 2024
4637b94
feat: enable auto-instrumentation with middleware for sanic
GSVarsha Sep 9, 2024
2fd6176
sanic: refactor tests
GSVarsha Sep 11, 2024
b3c35b3
sanic: use the lightweight sanic_testing module
GSVarsha Sep 16, 2024
1188af2
refactor(couchbase): added otel instrumentation of couchbase
CagriYonca Sep 13, 2024
8dee449
unittests(couchbase): added unittests of couchbase instrumentation
CagriYonca Sep 13, 2024
54340c1
refactor(cassandra): added cassandra otel instrumentation
CagriYonca Sep 12, 2024
fd43a53
unittest(cassandra): added unittests of cassandra otel instrumentation
CagriYonca Sep 12, 2024
f6bf1b1
refactor(redis): added instrumentation of redis
CagriYonca Sep 18, 2024
d087f7a
unittest(redis): added unittests for redis
CagriYonca Sep 18, 2024
f64b24e
refactor: Pika instrumentation.
pvital Sep 10, 2024
b55e3fe
tests(pika): adapt tests to OTel usage.
pvital Sep 10, 2024
c66ce2c
refactor: Remove TestAgent from the production code.
pvital Sep 19, 2024
8400110
refactor(sqlalchemy): added sqlalchemy otel instrumentation
CagriYonca Sep 18, 2024
81c7df2
unittest(sqlalchemy): added unittests of sqlalchemy otel instrumentation
CagriYonca Sep 18, 2024
0a63b0b
added cassandra instrumentation
CagriYonca Sep 20, 2024
4de8c0c
refactor: pyramid tween instrumentation
GSVarsha Sep 12, 2024
d219b58
pyramid: adapt tests after refactor
GSVarsha Sep 17, 2024
480ff09
pyramid: enable auto-instrumentation
GSVarsha Sep 20, 2024
863cf9b
pyramid: change from sdk span (http) to registered entry span (wsgi)
GSVarsha Sep 21, 2024
64e1e0b
unittest: updated test folder structure
CagriYonca Sep 18, 2024
aca41fe
unittest(redis): fix unittests and annotation
CagriYonca Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ commands:
- run:
name: Run Tests With Coverage Report
environment:
INSTANA_TEST: "true"
CASSANDRA_TEST: "<<parameters.cassandra>>"
COUCHBASE_TEST: "<<parameters.couchbase>>"
GEVENT_STARLETTE_TEST: "<<parameters.gevent>>"
Expand All @@ -78,6 +77,7 @@ commands:
steps:
- store_test_results:
path: test-results

run_sonarqube:
steps:
- attach_workspace:
Expand Down Expand Up @@ -118,8 +118,8 @@ commands:
jobs:
python38:
docker:
- image: cimg/python:3.8.20
- image: cimg/postgres:9.6.24
- image: cimg/python:3.8
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand All @@ -142,8 +142,8 @@ jobs:

python39:
docker:
- image: cimg/python:3.9.20
- image: cimg/postgres:9.6.24
- image: cimg/python:3.9
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand All @@ -166,8 +166,8 @@ jobs:

python310:
docker:
- image: cimg/python:3.10.15
- image: cimg/postgres:9.6.24
- image: cimg/python:3.10
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand All @@ -191,8 +191,8 @@ jobs:

python311:
docker:
- image: cimg/python:3.11.10
- image: cimg/postgres:9.6.24
- image: cimg/python:3.11
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand Down Expand Up @@ -231,8 +231,8 @@ jobs:

python312:
docker:
- image: cimg/python:3.12.6
- image: cimg/postgres:9.6.24
- image: cimg/python:3.12
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
python313:
docker:
- image: python:3.13.0rc2-bookworm
- image: cimg/postgres:9.6.24
- image: cimg/postgres:14.12
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
Expand All @@ -296,7 +296,7 @@ jobs:

py39couchbase:
docker:
- image: cimg/python:3.9.20
- image: cimg/python:3.9
- image: couchbase/server-sandbox:5.5.0
working_directory: ~/repo
steps:
Expand All @@ -312,7 +312,7 @@ jobs:

py39cassandra:
docker:
- image: cimg/python:3.9.20
- image: cimg/python:3.9
- image: cassandra:3.11
environment:
MAX_HEAP_SIZE: 2048m
Expand Down Expand Up @@ -363,11 +363,11 @@ workflows:
- python311
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py311googlecloud
- py312googlecloud
# - py39cassandra
# - py39couchbase
# - py39gevent_starlette
# - py311googlecloud
# - py312googlecloud
- final_job:
requires:
- python38
Expand All @@ -376,8 +376,8 @@ workflows:
- python311
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py311googlecloud
- py312googlecloud
# - py39cassandra
# - py39couchbase
# - py39gevent_starlette
# - py311googlecloud
# - py312googlecloud
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
except ImportError:
except Exception:
except Exception as exc:
1 change: 0 additions & 1 deletion .tekton/run_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ esac

echo -n "Configuration is '${TEST_CONFIGURATION}' on ${PYTHON_VERSION} "
echo "with dependencies in '${REQUIREMENTS}'"
export INSTANA_TEST='true'
ls -lah .
if [[ -n "${COUCHBASE_TEST}" ]]; then
echo "Install Couchbase Dependencies"
Expand Down
15 changes: 12 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requires-python = ">=3.8"
license = "MIT"
keywords = [
"performance",
"opentracing",
"opentelemetry",
"metrics",
"monitoring",
"tracing",
Expand Down Expand Up @@ -44,13 +44,13 @@ classifiers = [
]
dependencies = [
"autowrapt>=1.0",
"basictracer>=3.1.0",
"fysom>=2.1.2",
"opentracing>=2.3.0",
"protobuf<5.0.0",
"requests>=2.6.0",
"six>=1.12.0",
"urllib3>=1.26.5",
"opentelemetry-api>=1.26.0",
"opentelemetry-semantic-conventions>=0.47b0",
]

[project.entry-points."instana"]
Expand All @@ -59,6 +59,8 @@ string = "instana:load"
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"pytest-mock",
]

[project.urls]
Expand All @@ -77,3 +79,10 @@ include = [

[tool.hatch.build.targets.wheel]
packages = ["src/instana"]

[tool.coverage.report]
exclude_also = [
"pragma: no cover",
"if TYPE_CHECKING:",
"except ImportError:",
]
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ log_cli = 1
log_cli_level = WARN
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_date_format = %H:%M:%S
pythonpath = src
Loading