Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
43a0f3e
feat(OTel): Initial commit to migrate to OpenTelemetry.
pvital Mar 14, 2024
339b7c4
test(OTel): Remove opentracing tests and disable tests.
pvital Mar 21, 2024
5c7b440
ci(OTel): Adapt CircleCI to OTel and set to run only on master branch.
pvital Mar 21, 2024
906673f
refactor(span): Span and SpanContext migration to use OTel.
GSVarsha Mar 25, 2024
4f4948a
feat(OTel): Remove dependency of basictracer.
pvital Mar 17, 2024
ced1b5d
style: Format recorder.py and test_host_collector.py, and fix lint vi…
pvital Mar 17, 2024
757f7c5
feat(OTel): Add Sampler abstract class and adapt InstanaSampler class.
pvital Mar 28, 2024
8a768a8
refactor(tracer): Tracer migration to use OTel.
pvital Mar 28, 2024
5133773
style: format singletons.py, tracer.py and tests/helpers.py
pvital Mar 28, 2024
9f958ef
fix: handle circular imports caused by singletons.env_is_test
GSVarsha Apr 2, 2024
ee6caa7
feat(OTel): Enhance SpanContext and tracing utilities.
GSVarsha Apr 4, 2024
8a3f005
feat(OTel): Enhance Tracer classes.
pvital Apr 8, 2024
1b565cb
refactor: Tracer and Span ID generation.
pvital Apr 10, 2024
b977789
test(OTel): Disable auto instrumentation.
pvital Apr 10, 2024
3f51017
fix(test): Skip test_stan_recorder.py on macOS.
pvital Apr 10, 2024
24eaca4
style: format conftest.py
pvital Apr 10, 2024
d11815f
refactor: test_id_management.py to handle int IDs.
pvital Apr 10, 2024
a674cca
test(OTel): Add TracerProvider and Tracer tests.
pvital Apr 10, 2024
f0a695d
style: collector files
pvital Apr 11, 2024
3fb331a
test(OTel): Add tests for SpanContext and Event classes.
pvital Apr 18, 2024
e8aef70
tests(OTel): Add tests for InstanaSpan, BaseSpan, SDKSpan and Registe…
pvital Apr 29, 2024
9ce1683
adapt get_current_span(), get_active_tracer() & get_tracer_tuple() to…
GSVarsha Jul 4, 2024
b57233f
adapt inject and extract to OTel
GSVarsha Jul 4, 2024
060f1c8
adapt traceparent, tracestate to OTel
GSVarsha Jul 4, 2024
c96783d
report(currency): update support policy
GSVarsha Jul 2, 2024
0936529
ci: Start testing on beta runtime
Ferenc- Jul 1, 2024
552d835
feat: Add CarrierT type to BasePropagator.
pvital Jul 4, 2024
c07a5fb
fix: Import of gc in collector/helpers/runtime.py
pvital Jul 4, 2024
5c6e99b
fix(tests): Add pytest-mock as test requirement.
pvital Jul 4, 2024
725dae6
ci(OTel): Remove Cassandra, Couchbase and Gevent tests
pvital Jul 4, 2024
ab8d836
Merge branch 'otel_migration' into otel_utilities
pvital Jul 4, 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
61 changes: 46 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ commands:
steps:
- store_test_results:
path: test-results

run_sonarqube:
steps:
- attach_workspace:
Expand Down Expand Up @@ -103,8 +104,8 @@ commands:
-Dsonar.login="${SONARQUBE_LOGIN}" \
-Dsonar.branch.name="${CIRCLE_BRANCH}"
fi
store_artifacts:
path: htmlcov
- store_artifacts:
path: htmlcov

store-coverage-report:
steps:
Expand All @@ -114,7 +115,7 @@ commands:
jobs:
python38:
docker:
- image: cimg/python:3.8.17
- image: cimg/python:3.8
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
Expand All @@ -138,7 +139,7 @@ jobs:

python39:
docker:
- image: cimg/python:3.9.17
- image: cimg/python:3.9
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
Expand All @@ -162,7 +163,7 @@ jobs:

python310:
docker:
- image: cimg/python:3.10.12
- image: cimg/python:3.10
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
Expand All @@ -187,7 +188,7 @@ jobs:

python311:
docker:
- image: cimg/python:3.11.4
- image: cimg/python:3.11
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
Expand All @@ -212,7 +213,7 @@ jobs:

python312:
docker:
- image: cimg/python:3.12.0
- image: cimg/python:3.12
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
Expand All @@ -235,9 +236,34 @@ jobs:
- store-pytest-results
- store-coverage-report

python313:
docker:
- image: python:3.13.0b2-bookworm
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-313.txt"
- run-tests-with-coverage-report
- store-pytest-results
- store-coverage-report

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

py39cassandra:
docker:
- image: cimg/python:3.9.17
- image: cimg/python:3.9
- image: cassandra:3.11
environment:
MAX_HEAP_SIZE: 2048m
Expand Down Expand Up @@ -303,16 +329,21 @@ workflows:
- python310
- python311
- python312
- py39cassandra
- py39couchbase
- py39gevent_starlette
- python313
# - py39cassandra
# - py39couchbase
# - py39gevent_starlette
- final_job:
requires:
- python38
- python39
- python310
- python311
- python312
- py39cassandra
- py39couchbase
- py39gevent_starlette
- python313
# - py39cassandra
# - py39couchbase
# - py39gevent_starlette
filters:
branches:
only: master
14 changes: 7 additions & 7 deletions .tekton/.currency/resources/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"table": [
{
"Package name": "ASGI",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Last Supported Version": "3.0",
"Cloud Native": "No"
Expand All @@ -21,13 +21,13 @@
},
{
"Package name": "FastAPI",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Cloud Native": "No"
},
{
"Package name": "Flask",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Cloud Native": "No"
},
Expand Down Expand Up @@ -66,7 +66,7 @@
{
"Package name": "WSGI",
"Support Policy": "0-day",
"Beta version": "No",
"Beta version": "Yes",
"Last Supported Version": "1.0.1",
"Cloud Native": "No"
},
Expand All @@ -85,7 +85,7 @@
},
{
"Package name": "Boto3",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Cloud Native": "Yes"
},
Expand Down Expand Up @@ -145,7 +145,7 @@
},
{
"Package name": "Requests",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Cloud Native": "Yes"
},
Expand All @@ -157,7 +157,7 @@
},
{
"Package name": "Urllib3",
"Support Policy": "0-day",
"Support Policy": "30-days",
"Beta version": "No",
"Cloud Native": "No"
}
Expand Down
30 changes: 16 additions & 14 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ spec:
params:
- name: imageDigest
value:
# 3.8.18-bookworm
- "sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"
# 3.9.18-bookworm
- "sha256:530d4ba717be787c0e2d011aa107edac6d721f8c06fe6d44708d4aa5e9bc5ec9"
# 3.10.13-bookworm
- "sha256:c970ff53939772f47b0672e380328afb50d8fd1c0568ed4f82c22effc54244fc"
# 3.11.8-bookworm
- "sha256:72afb375030b13c8c9cb72ba1d8c410f25307c2dbbd7d59f9c6ccea5cb152ff9"
# 3.12.2-bookworm
- "sha256:35eff340c0acd837b7962f77ee4b8869385dd6fe7d3928375a08f0a3bdd18beb"
# 3.8.19-bookworm
- "sha256:4d3590657cf443010b58ae94a09c59505a750744ed70d2028b35dac101df5e3a"
# 3.9.19-bookworm
- "sha256:e298e2e898691a938073f670dac8ef1a551c83344b67b5d8e32d1fbc8e0b57f8"
# 3.10.14-bookworm
- "sha256:c0352a2c64efe4cc08b198e90b97ed7e08897518c4bee99647e3eaf676e84951"
# 3.11.9-bookworm
- "sha256:0c2928128a96e544a1ee248e50ee8ecbe840bf48ef5a49065812e3d06b6e1bcc"
# 3.12.4-bookworm
- "sha256:83f5f8714b6881d3e0e91023d9fe9e43aa6ad5a04e9f9a94ee180b18b021c72a"
# 3.13.0b2-bookworm
- "sha256:6502f02f8a02313f582928ec7159623b54d7c3d627a7e355ca46f4aace406a6a"
taskRef:
name: python-tracer-unittest-default-task
workspaces:
Expand All @@ -47,8 +49,8 @@ spec:
params:
- name: imageDigest
value:
# 3.9.18-bookworm
- "sha256:530d4ba717be787c0e2d011aa107edac6d721f8c06fe6d44708d4aa5e9bc5ec9"
# 3.9.19-bookworm
- "sha256:e298e2e898691a938073f670dac8ef1a551c83344b67b5d8e32d1fbc8e0b57f8"
taskRef:
name: python-tracer-unittest-cassandra-task
workspaces:
Expand All @@ -61,8 +63,8 @@ spec:
params:
- name: imageDigest
value:
# 3.9.18-bookworm
- "sha256:530d4ba717be787c0e2d011aa107edac6d721f8c06fe6d44708d4aa5e9bc5ec9"
# 3.9.19-bookworm
- "sha256:e298e2e898691a938073f670dac8ef1a551c83344b67b5d8e32d1fbc8e0b57f8"
taskRef:
name: python-tracer-unittest-couchbase-task
workspaces:
Expand Down
40 changes: 14 additions & 26 deletions .tekton/python-tracer-prepuller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,41 +49,29 @@ spec:
# postgres:16.2-bookworm
image: postgres@sha256:3bfb87432e26badf72d727a0c5f5bb7b81438cd9baec5be8531c70a42b07adc6
command: ["sh", "-c", "'true'"]
- name: prepuller-30
# 3.0.6-bullseye
image: ruby@sha256:3166618469ad8a3190d80f43b322818fafb4bfac0b4882255eee3346af2a0a35
command: ["sh", "-c", "'true'"]
- name: prepuller-31
# 3.1.4-bookworm
image: ruby@sha256:ec69284bcbceb0a23ffc070ef2e0e8eb0fe495c20efbd51846b103338c3da1e4
command: ["sh", "-c", "'true'"]
- name: prepuller-32
# 3.2.3-bookworm
image: ruby@sha256:007d2edd515f9cfc8c5c571486aca4fc4a25c903d004decee302961bb8c636ed
command: ["sh", "-c", "'true'"]
- name: prepuller-33
# 3.3.1-bookworm
image: ruby@sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d
command: ["sh", "-c", "'true'"]
- name: prepuller-38
# 3.8.18-bookworm
image: "python@sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"
# 3.8.19-bookworm
image: "python@sha256:4d3590657cf443010b58ae94a09c59505a750744ed70d2028b35dac101df5e3a"
command: ["sh", "-c", "'true'"]
- name: prepuller-39
# 3.9.18-bookworm
image: "python@sha256:530d4ba717be787c0e2d011aa107edac6d721f8c06fe6d44708d4aa5e9bc5ec9"
# 3.9.19-bookworm
image: "python@sha256:e298e2e898691a938073f670dac8ef1a551c83344b67b5d8e32d1fbc8e0b57f8"
command: ["sh", "-c", "'true'"]
- name: prepuller-310
# 3.10.13-bookworm
image: "python@sha256:c970ff53939772f47b0672e380328afb50d8fd1c0568ed4f82c22effc54244fc"
# 3.10.14-bookworm
image: "python@sha256:c0352a2c64efe4cc08b198e90b97ed7e08897518c4bee99647e3eaf676e84951"
command: ["sh", "-c", "'true'"]
- name: prepuller-311
# 3.11.8-bookworm
image: "python@sha256:72afb375030b13c8c9cb72ba1d8c410f25307c2dbbd7d59f9c6ccea5cb152ff9"
# 3.11.9-bookworm
image: "python@sha256:0c2928128a96e544a1ee248e50ee8ecbe840bf48ef5a49065812e3d06b6e1bcc"
command: ["sh", "-c", "'true'"]
- name: prepuller-312
# 3.12.2-bookworm
image: "python@sha256:35eff340c0acd837b7962f77ee4b8869385dd6fe7d3928375a08f0a3bdd18beb"
# 3.12.4-bookworm
image: "python@sha256:83f5f8714b6881d3e0e91023d9fe9e43aa6ad5a04e9f9a94ee180b18b021c72a"
command: ["sh", "-c", "'true'"]
- name: prepuller-313
# 3.13.0b2-bookworm
image: "python@sha256:6502f02f8a02313f582928ec7159623b54d7c3d627a7e355ca46f4aace406a6a"
command: ["sh", "-c", "'true'"]

# Use the pause container to ensure the Pod goes into a `Running` phase
Expand Down
3 changes: 3 additions & 0 deletions .tekton/run_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ default)
export REQUIREMENTS='requirements-310.txt' ;;
12)
export REQUIREMENTS='requirements-312.txt' ;;
13)
export REQUIREMENTS='requirements-313.txt' ;;
*)
export REQUIREMENTS='requirements.txt' ;;
esac
Expand Down Expand Up @@ -59,6 +61,7 @@ if [[ -n "${COUCHBASE_TEST}" ]]; then
apt update
apt install libcouchbase-dev -y
fi

python -m venv /tmp/venv
# shellcheck disable=SC1091
source /tmp/venv/bin/activate
Expand Down
5 changes: 2 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,12 @@ 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.23.0",
]

[project.optional-dependencies]
Expand Down
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
8 changes: 5 additions & 3 deletions src/instana/collector/aws_eks_fargate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
"""

from time import time
from instana.log import logger

from instana.collector.base import BaseCollector
from instana.collector.helpers.eks.process import EKSFargateProcessHelper
from instana.collector.helpers.runtime import RuntimeHelper
from instana.collector.utils import format_trace_and_span_ids
from instana.log import logger
from instana.util import DictionaryOfStan


class EKSFargateCollector(BaseCollector):
""" Collector for EKS Pods on AWS Fargate """
"""Collector for EKS Pods on AWS Fargate"""

def __init__(self, agent):
super(EKSFargateCollector, self).__init__(agent)
Expand All @@ -35,7 +37,7 @@ def prepare_payload(self):

try:
if not self.span_queue.empty():
payload["spans"] = self.queued_spans()
payload["spans"] = format_trace_and_span_ids(self.queued_spans())

with_snapshot = self.should_send_snapshot_data()

Expand Down
Loading