Skip to content

Commit

Permalink
Merge branch 'main' into Fix-bug-when-labels-are-ordered-differently
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Mar 7, 2024
2 parents 6a2fe89 + 8ad10f7 commit 4c5a2a0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Fix python 3.12 deprecation warning
([#3751](https://github.com/open-telemetry/opentelemetry-python/pull/3751))

## Version 1.23.0/0.44b0 (2024-02-23)

- Use Attribute rather than boundattribute in logrecord
Expand Down
4 changes: 3 additions & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py
Expand Up @@ -23,7 +23,9 @@

def ns_to_iso_str(nanoseconds):
"""Get an ISO 8601 string from time_ns value."""
ts = datetime.datetime.utcfromtimestamp(nanoseconds / 1e9)
ts = datetime.datetime.fromtimestamp(
nanoseconds / 1e9, tz=datetime.timezone.utc
)
return ts.strftime("%Y-%m-%dT%H:%M:%S.%fZ")


Expand Down
48 changes: 23 additions & 25 deletions tox.ini
Expand Up @@ -96,29 +96,6 @@ setenv =
CONTRIB_REPO=git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/

changedir =
api: opentelemetry-api/tests
sdk: opentelemetry-sdk/tests
protobuf: opentelemetry-proto/tests
semantic-conventions: opentelemetry-semantic-conventions/tests
getting-started: docs/getting_started/tests
opentracing-shim: shim/opentelemetry-opentracing-shim/tests
opencensus-shim: shim/opentelemetry-opencensus-shim/tests

exporter-opencensus: exporter/opentelemetry-exporter-opencensus/tests
exporter-otlp-proto-common: exporter/opentelemetry-exporter-otlp-proto-common/tests
exporter-otlp-combined: exporter/opentelemetry-exporter-otlp/tests
exporter-otlp-proto-grpc: exporter/opentelemetry-exporter-otlp-proto-grpc/tests
exporter-otlp-proto-http: exporter/opentelemetry-exporter-otlp-proto-http/tests
exporter-prometheus: exporter/opentelemetry-exporter-prometheus/tests
exporter-zipkin-combined: exporter/opentelemetry-exporter-zipkin/tests
exporter-zipkin-proto-http: exporter/opentelemetry-exporter-zipkin-proto-http/tests
exporter-zipkin-json: exporter/opentelemetry-exporter-zipkin-json/tests

propagator-b3: propagator/opentelemetry-propagator-b3/tests
propagator-jaeger: propagator/opentelemetry-propagator-jaeger/tests
test-utils: tests/opentelemetry-test-utils/tests

commands_pre =
; Install without -e to test the actual installation
py3{8,9,10,11}: python -m pip install -U pip setuptools wheel
Expand All @@ -128,7 +105,7 @@ commands_pre =

protobuf: pip install {toxinidir}/opentelemetry-proto

getting-started: pip install -r requirements.txt
getting-started: pip install -r {toxinidir}/docs/getting_started/tests/requirements.txt
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests
Expand Down Expand Up @@ -184,7 +161,28 @@ commands_pre =
mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/

commands =
opentelemetry: pytest {posargs}
api: pytest {toxinidir}/opentelemetry-api/tests {posargs}
sdk: pytest {toxinidir}/opentelemetry-sdk/tests {posargs}
protobuf: pytest {toxinidir}/opentelemetry-proto/tests {posargs}
semantic-conventions: pytest {toxinidir}/opentelemetry-semantic-conventions/tests {posargs}
getting-started: pytest {toxinidir}/docs/getting_started/tests {posargs}
opentracing-shim: pytest {toxinidir}/shim/opentelemetry-opentracing-shim/tests {posargs}
opencensus-shim: pytest {toxinidir}/shim/opentelemetry-opencensus-shim/tests {posargs}

exporter-opencensus: pytest {toxinidir}/exporter/opentelemetry-exporter-opencensus/tests {posargs}
exporter-otlp-proto-common: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/tests {posargs}
exporter-otlp-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp/tests {posargs}
exporter-otlp-proto-grpc: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/tests {posargs}
exporter-otlp-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/tests {posargs}
exporter-prometheus: pytest {toxinidir}/exporter/opentelemetry-exporter-prometheus/tests {posargs}
exporter-zipkin-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin/tests {posargs}
exporter-zipkin-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/tests {posargs}
exporter-zipkin-json: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/tests {posargs}

propagator-b3: pytest {toxinidir}/propagator/opentelemetry-propagator-b3/tests {posargs}
propagator-jaeger: pytest {toxinidir}/propagator/opentelemetry-propagator-jaeger/tests {posargs}
test-utils: pytest {toxinidir}/tests/opentelemetry-test-utils/tests {posargs}

coverage: {toxinidir}/scripts/coverage.sh

mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-api/src/opentelemetry/
Expand Down

0 comments on commit 4c5a2a0

Please sign in to comment.