Skip to content

Commit

Permalink
Merge branch 'main' into update-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv committed Apr 10, 2024
2 parents 028484e + 956f03f commit 2689aa9
Show file tree
Hide file tree
Showing 52 changed files with 543 additions and 146 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# Otherwise, set variable to the commit of your branch on
# opentelemetry-python-contrib which is compatible with these Core repo
# changes.
CONTRIB_REPO_SHA: 9a7c2f7ba16669d00be273aa9e988af0df7aba4c
CONTRIB_REPO_SHA: 3c2788469834aa4f5976e1644d757f43d60bc219
# This is needed because we do not clone the core repo in contrib builds anymore.
# When running contrib builds as part of core builds, we use actions/checkout@v2 which
# does not set an environment variable (simply just runs tox), which is different when
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
- "tornado"
- "tortoiseorm"
- "urllib"
- "urllib3v"
- "urllib3"
- "wsgi"
- "prometheus-remote-write"
- "richconsole"
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Update proto version to v1.2.0
([#3844](https://github.com/open-telemetry/opentelemetry-python/pull/3844))
- Add to_json method to ExponentialHistogram
([#3780](https://github.com/open-telemetry/opentelemetry-python/pull/3780))
- Bump mypy to 1.9.0
([#3795](https://github.com/open-telemetry/opentelemetry-python/pull/3795))
- Fix exponential histograms
([#3798](https://github.com/open-telemetry/opentelemetry-python/pull/3798))
- Fix otlp exporter to export log_record.observed_timestamp
([#3785](https://github.com/open-telemetry/opentelemetry-python/pull/3785))

## Version 1.24.0/0.45b0 (2024-03-28)

- Make create_gauge non-abstract method
([#3817](https://github.com/open-telemetry/opentelemetry-python/pull/3817))
- Make `tracer.start_as_current_span()` decorator work with async functions
([#3633](https://github.com/open-telemetry/opentelemetry-python/pull/3633))
- Fix python 3.12 deprecation warning
Expand All @@ -19,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3648](https://github.com/open-telemetry/opentelemetry-python/pull/3648))
- Fix ValueError message for PeriodicExportingMetricsReader
([#3769](https://github.com/open-telemetry/opentelemetry-python/pull/3769))
- Use `BaseException` instead of `Exception` in `record_exception`
([#3354](https://github.com/open-telemetry/opentelemetry-python/pull/3354))
- Make span.record_exception more robust
([#3778](https://github.com/open-telemetry/opentelemetry-python/pull/3778))
- Fix license field in pyproject.toml files
Expand Down Expand Up @@ -1498,3 +1513,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove dependency on 'backoff' library
([#3679](https://github.com/open-telemetry/opentelemetry-python/pull/3679))


- Make create_gauge non-abstract method
([#3817](https://github.com/open-telemetry/opentelemetry-python/pull/3817))
- Make `tracer.start_as_current_span()` decorator work with async functions
([#3633](https://github.com/open-telemetry/opentelemetry-python/pull/3633))
- Fix python 3.12 deprecation warning
([#3751](https://github.com/open-telemetry/opentelemetry-python/pull/3751))
- bump mypy to 0.982
([#3776](https://github.com/open-telemetry/opentelemetry-python/pull/3776))
- Add support for OTEL_SDK_DISABLED environment variable
([#3648](https://github.com/open-telemetry/opentelemetry-python/pull/3648))
- Fix ValueError message for PeriodicExportingMetricsReader
([#3769](https://github.com/open-telemetry/opentelemetry-python/pull/3769))
- Use `BaseException` instead of `Exception` in `record_exception`
([#3354](https://github.com/open-telemetry/opentelemetry-python/pull/3354))
- Make span.record_exception more robust
([#3778](https://github.com/open-telemetry/opentelemetry-python/pull/3778))
- Fix license field in pyproject.toml files
([#3803](https://github.com/open-telemetry/opentelemetry-python/pull/3803))

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telem

- [Aaron Abbott](https://github.com/aabmass), Google
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
- [Owais Lone](https://github.com/owais), Splunk
- [Pablo Collins](https://github.com/pmcollins), Splunk
- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
- [Shalev Roda](https://github.com/shalevr), Cisco
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
- [Tammy Baylis](https://github.com/tammy-baylis-swi), SolarWinds

Emeritus Approvers

Expand All @@ -111,6 +115,8 @@ Emeritus Approvers
- [Héctor Hernández](https://github.com/hectorhdzg), Microsoft
- [Mauricio Vásquez](https://github.com/mauriciovasquezbernal), Kinvolk
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), AWS
- [Nikolay Sokolik](https://github.com/oxeye-nikolay), Oxeye
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
- [Tahir H. Butt](https://github.com/majorgreys), DataDog

*For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ flake8==6.1.0
isort==5.12.0
black==22.3.0
httpretty==1.1.4
mypy==0.982
mypy==1.9.0
sphinx==7.1.2
sphinx-rtd-theme==2.0.0rc4
sphinx-autodoc-typehints==1.25.2
Expand Down
4 changes: 2 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sortfirst=
exporter/*

[stable]
version=1.24.0.dev
version=1.25.0.dev

packages=
opentelemetry-sdk
Expand All @@ -27,7 +27,7 @@ packages=
opentelemetry-api

[prerelease]
version=0.45b0.dev
version=0.46b0.dev

packages=
opentelemetry-opentracing-shim
Expand Down
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-opencensus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"grpcio >= 1.0.0, < 2.0.0",
"opencensus-proto >= 0.1.0, < 1.0.0",
"opentelemetry-api >= 1.24.0.dev",
"opentelemetry-api >= 1.25.0.dev",
"opentelemetry-sdk >= 1.15",
"protobuf ~= 3.13",
"setuptools >= 16.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.45b0.dev"
__version__ = "0.46b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"opentelemetry-proto == 1.24.0.dev",
"opentelemetry-proto == 1.25.0.dev",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def encode_logs(batch: Sequence[LogData]) -> ExportLogsServiceRequest:
def _encode_log(log_data: LogData) -> PB2LogRecord:
return PB2LogRecord(
time_unix_nano=log_data.log_record.timestamp,
observed_time_unix_nano=log_data.log_record.observed_timestamp,
span_id=_encode_span_id(log_data.log_record.span_id),
trace_id=_encode_trace_id(log_data.log_record.trace_id),
flags=int(log_data.log_record.trace_flags),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def _get_sdk_log_data() -> List[LogData]:
log1 = LogData(
log_record=SDKLogRecord(
timestamp=1644650195189786880,
observed_timestamp=1644650195189786881,
trace_id=89564621134313219400156819398935297684,
span_id=1312458408527513268,
trace_flags=TraceFlags(0x01),
Expand All @@ -89,6 +90,7 @@ def _get_sdk_log_data() -> List[LogData]:
log2 = LogData(
log_record=SDKLogRecord(
timestamp=1644650249738562048,
observed_timestamp=1644650249738562049,
trace_id=0,
span_id=0,
trace_flags=TraceFlags.DEFAULT,
Expand All @@ -106,6 +108,7 @@ def _get_sdk_log_data() -> List[LogData]:
log3 = LogData(
log_record=SDKLogRecord(
timestamp=1644650427658989056,
observed_timestamp=1644650427658989057,
trace_id=271615924622795969659406376515024083555,
span_id=4242561578944770265,
trace_flags=TraceFlags(0x01),
Expand All @@ -121,6 +124,7 @@ def _get_sdk_log_data() -> List[LogData]:
log4 = LogData(
log_record=SDKLogRecord(
timestamp=1644650584292683008,
observed_timestamp=1644650584292683009,
trace_id=212592107417388365804938480559624925555,
span_id=6077757853989569223,
trace_flags=TraceFlags(0x01),
Expand Down Expand Up @@ -164,6 +168,7 @@ def get_test_logs(
log_records=[
PB2LogRecord(
time_unix_nano=1644650195189786880,
observed_time_unix_nano=1644650195189786881,
trace_id=_encode_trace_id(
89564621134313219400156819398935297684
),
Expand All @@ -190,6 +195,7 @@ def get_test_logs(
log_records=[
PB2LogRecord(
time_unix_nano=1644650584292683008,
observed_time_unix_nano=1644650584292683009,
trace_id=_encode_trace_id(
212592107417388365804938480559624925555
),
Expand Down Expand Up @@ -232,6 +238,7 @@ def get_test_logs(
log_records=[
PB2LogRecord(
time_unix_nano=1644650249738562048,
observed_time_unix_nano=1644650249738562049,
trace_id=_encode_trace_id(0),
span_id=_encode_span_id(0),
flags=int(TraceFlags.DEFAULT),
Expand All @@ -249,6 +256,7 @@ def get_test_logs(
log_records=[
PB2LogRecord(
time_unix_nano=1644650427658989056,
observed_time_unix_nano=1644650427658989057,
trace_id=_encode_trace_id(
271615924622795969659406376515024083555
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ dependencies = [
"googleapis-common-protos ~= 1.52",
"grpcio >= 1.0.0, < 2.0.0",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.24.0.dev",
"opentelemetry-sdk ~= 1.24.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.24.0.dev",
"opentelemetry-proto == 1.25.0.dev",
"opentelemetry-sdk ~= 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.25.0.dev",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def test_translate_log_data(self):
PB2LogRecord(
# pylint: disable=no-member
time_unix_nano=self.log_data_1.log_record.timestamp,
observed_time_unix_nano=self.log_data_1.log_record.observed_timestamp,
severity_number=self.log_data_1.log_record.severity_number.value,
severity_text="WARNING",
span_id=int.to_bytes(
Expand Down Expand Up @@ -420,6 +421,7 @@ def test_translate_multiple_logs(self):
PB2LogRecord(
# pylint: disable=no-member
time_unix_nano=self.log_data_1.log_record.timestamp,
observed_time_unix_nano=self.log_data_1.log_record.observed_timestamp,
severity_number=self.log_data_1.log_record.severity_number.value,
severity_text="WARNING",
span_id=int.to_bytes(
Expand Down Expand Up @@ -457,6 +459,7 @@ def test_translate_multiple_logs(self):
PB2LogRecord(
# pylint: disable=no-member
time_unix_nano=self.log_data_2.log_record.timestamp,
observed_time_unix_nano=self.log_data_2.log_record.observed_timestamp,
severity_number=self.log_data_2.log_record.severity_number.value,
severity_text="INFO",
span_id=int.to_bytes(
Expand Down Expand Up @@ -502,6 +505,7 @@ def test_translate_multiple_logs(self):
PB2LogRecord(
# pylint: disable=no-member
time_unix_nano=self.log_data_3.log_record.timestamp,
observed_time_unix_nano=self.log_data_3.log_record.observed_timestamp,
severity_number=self.log_data_3.log_record.severity_number.value,
severity_text="ERROR",
span_id=int.to_bytes(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies = [
"Deprecated >= 1.2.6",
"googleapis-common-protos ~= 1.52",
"opentelemetry-api ~= 1.15",
"opentelemetry-proto == 1.24.0.dev",
"opentelemetry-sdk ~= 1.24.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.24.0.dev",
"opentelemetry-proto == 1.25.0.dev",
"opentelemetry-sdk ~= 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-common == 1.25.0.dev",
"requests ~= 2.7",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,13 @@ def _retryable(resp: requests.Response) -> bool:
return True
return False

def export(self, spans) -> SpanExportResult:
# After the call to Shutdown subsequent calls to Export are
# not allowed and should return a Failure result.
if self._shutdown:
_logger.warning("Exporter already shutdown, ignoring batch")
return SpanExportResult.FAILURE

serialized_data = encode_spans(spans).SerializeToString()
def _serialize_spans(self, spans):
return encode_spans(spans).SerializePartialToString()

def _export_serialized_spans(self, serialized_data):
for delay in _create_exp_backoff_generator(
max_value=self._MAX_RETRY_TIMEOUT
):

if delay == self._MAX_RETRY_TIMEOUT:
return SpanExportResult.FAILURE

Expand All @@ -163,6 +157,17 @@ def export(self, spans) -> SpanExportResult:
return SpanExportResult.FAILURE
return SpanExportResult.FAILURE

def export(self, spans) -> SpanExportResult:
# After the call to Shutdown subsequent calls to Export are
# not allowed and should return a Failure result.
if self._shutdown:
_logger.warning("Exporter already shutdown, ignoring batch")
return SpanExportResult.FAILURE

serialized_data = self._serialize_spans(spans)

return self._export_serialized_spans(serialized_data)

def shutdown(self):
if self._shutdown:
_logger.warning("Exporter already shutdown, ignoring call")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-otlp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-exporter-otlp-proto-grpc == 1.24.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.24.0.dev",
"opentelemetry-exporter-otlp-proto-grpc == 1.25.0.dev",
"opentelemetry-exporter-otlp-proto-http == 1.25.0.dev",
]

[project.entry-points.opentelemetry_logs_exporter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-prometheus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
dependencies = [
"opentelemetry-api ~= 1.12",
# DONOTMERGE: confirm that this will becomes ~= 1.21 in the next release
"opentelemetry-sdk ~= 1.24.0.dev",
"opentelemetry-sdk ~= 1.25.0.dev",
"prometheus_client >= 0.5.0, < 1.0.0",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.45b0.dev"
__version__ = "0.46b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.3",
"opentelemetry-exporter-zipkin-json == 1.24.0.dev",
"opentelemetry-exporter-zipkin-json == 1.25.0.dev",
"opentelemetry-sdk ~= 1.11",
"protobuf ~= 3.12",
"requests ~= 2.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.24.0.dev"
__version__ = "1.25.0.dev"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-zipkin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"opentelemetry-exporter-zipkin-json == 1.24.0.dev",
"opentelemetry-exporter-zipkin-proto-http == 1.24.0.dev",
"opentelemetry-exporter-zipkin-json == 1.25.0.dev",
"opentelemetry-exporter-zipkin-proto-http == 1.25.0.dev",
]

[project.entry-points.opentelemetry_traces_exporter]
Expand Down
Loading

0 comments on commit 2689aa9

Please sign in to comment.