Skip to content

Commit

Permalink
Merge branch 'main' into fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed May 6, 2024
2 parents e9e1a3e + 397e357 commit 13cc549
Show file tree
Hide file tree
Showing 84 changed files with 6,437 additions and 426 deletions.
21 changes: 16 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3785](https://github.com/open-telemetry/opentelemetry-python/pull/3785))
- Add capture the fully qualified type name for raised exceptions in spans
([#3837](https://github.com/open-telemetry/opentelemetry-python/pull/3837))
- Prometheus exporter sort label keys to prevent duplicate metrics when user input changes order
- Prometheus exporter sort label keys to prevent duplicate metrics when user input changes order
([#3698](https://github.com/open-telemetry/opentelemetry-python/pull/3698))
- Update semantic conventions to version 1.25.0.
Refactor semantic-convention structure:
- `SpanAttributes`, `ResourceAttributes`, and `MetricInstruments` are deprecated.
- Attribute and metric definitions are now grouped by the namespace.
- Stable attributes and metrics are moved to `opentelemetry.semconv.attributes`
and `opentelemetry.semconv.metrics` modules.
- Stable and experimental attributes and metrics are defined under
`opentelemetry.semconv._incubating` import path.
([#3586](https://github.com/open-telemetry/opentelemetry-python/pull/3586))
- Rename test objects to avoid pytest warnings
([#3823] (https://github.com/open-telemetry/opentelemetry-python/pull/3823))

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

Expand Down Expand Up @@ -69,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3564](https://github.com/open-telemetry/opentelemetry-python/pull/3564))
- Fix explicit bucket histogram aggregation
([#3429](https://github.com/open-telemetry/opentelemetry-python/pull/3429))
- Add `code.lineno`, `code.function` and `code.filepath` to all logs
- Add `code.lineno`, `code.function` and `code.filepath` to all logs
([#3675](https://github.com/open-telemetry/opentelemetry-python/pull/3675))
- Add Synchronous Gauge instrument
([#3462](https://github.com/open-telemetry/opentelemetry-python/pull/3462))
Expand All @@ -94,7 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3572](https://github.com/open-telemetry/opentelemetry-python/pull/3572))
- Remove Jaeger exporters
([#3554](https://github.com/open-telemetry/opentelemetry-python/pull/3554))
- Log stacktrace on `UNKNOWN` status OTLP export error
- Log stacktrace on `UNKNOWN` status OTLP export error
([#3536](https://github.com/open-telemetry/opentelemetry-python/pull/3536))
- Fix OTLPExporterMixin shutdown timeout period
([#3524](https://github.com/open-telemetry/opentelemetry-python/pull/3524))
Expand All @@ -119,7 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3251](https://github.com/open-telemetry/opentelemetry-python/pull/3251))
- Add missing schema_url in global api for logging and metrics
([#3251](https://github.com/open-telemetry/opentelemetry-python/pull/3251))
- Prometheus exporter support for auto instrumentation
- Prometheus exporter support for auto instrumentation
([#3413](https://github.com/open-telemetry/opentelemetry-python/pull/3413))
- Implement Process Resource detector
([#3472](https://github.com/open-telemetry/opentelemetry-python/pull/3472))
Expand Down Expand Up @@ -1502,7 +1513,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3564](https://github.com/open-telemetry/opentelemetry-python/pull/3564))
- Fix explicit bucket histogram aggregation
([#3429](https://github.com/open-telemetry/opentelemetry-python/pull/3429))
- Add `code.lineno`, `code.function` and `code.filepath` to all logs
- Add `code.lineno`, `code.function` and `code.filepath` to all logs
([#3645](https://github.com/open-telemetry/opentelemetry-python/pull/3645))
- Add Synchronous Gauge instrument
([#3462](https://github.com/open-telemetry/opentelemetry-python/pull/3462))
Expand Down
8 changes: 4 additions & 4 deletions opentelemetry-api/tests/logs/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def get_logger(
version: typing.Optional[str] = None,
schema_url: typing.Optional[str] = None,
) -> _logs.Logger:
return TestLogger(name)
return LoggerTest(name)


class TestLogger(_logs.NoOpLogger):
class LoggerTest(_logs.NoOpLogger):
def emit(self, record: _logs.LogRecord) -> None:
pass

Expand All @@ -54,9 +54,9 @@ def test_proxy_logger(self):

# logger provider now returns real instance
self.assertIsInstance(
_logs.get_logger_provider().get_logger("fresh"), TestLogger
_logs.get_logger_provider().get_logger("fresh"), LoggerTest
)

# references to the old provider still work but return real logger now
real_logger = provider.get_logger("proxy-test")
self.assertIsInstance(real_logger, TestLogger)
self.assertIsInstance(real_logger, LoggerTest)
8 changes: 4 additions & 4 deletions opentelemetry-api/tests/trace/test_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from opentelemetry.trace.status import Status, StatusCode


class TestSpan(trace.NonRecordingSpan):
class SpanTest(trace.NonRecordingSpan):
has_ended = False
recorded_exception = None
recorded_status = Status(status_code=StatusCode.UNSET)
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_use_span(self):

def test_use_span_end_on_exit(self):

test_span = TestSpan(trace.INVALID_SPAN_CONTEXT)
test_span = SpanTest(trace.INVALID_SPAN_CONTEXT)

with trace.use_span(test_span):
pass
Expand All @@ -124,7 +124,7 @@ def test_use_span_exception(self):
class TestUseSpanException(Exception):
pass

test_span = TestSpan(trace.INVALID_SPAN_CONTEXT)
test_span = SpanTest(trace.INVALID_SPAN_CONTEXT)
exception = TestUseSpanException("test exception")
with self.assertRaises(TestUseSpanException):
with trace.use_span(test_span):
Expand All @@ -136,7 +136,7 @@ def test_use_span_set_status(self):
class TestUseSpanException(Exception):
pass

test_span = TestSpan(trace.INVALID_SPAN_CONTEXT)
test_span = SpanTest(trace.INVALID_SPAN_CONTEXT)
with self.assertRaises(TestUseSpanException):
with trace.use_span(test_span):
raise TestUseSpanException("test error")
Expand Down
8 changes: 4 additions & 4 deletions opentelemetry-api/tests/trace/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def get_tracer(

class TestTracer(trace.NoOpTracer):
def start_span(self, *args, **kwargs):
return TestSpan(INVALID_SPAN_CONTEXT)
return SpanTest(INVALID_SPAN_CONTEXT)

@_agnosticcontextmanager # pylint: disable=protected-access
def start_as_current_span(self, *args, **kwargs): # type: ignore
with trace.use_span(self.start_span(*args, **kwargs)) as span: # type: ignore
yield span


class TestSpan(NonRecordingSpan):
class SpanTest(NonRecordingSpan):
pass


Expand Down Expand Up @@ -82,7 +82,7 @@ def test_proxy_tracer(self):
# reference to old proxy tracer now delegates to a real tracer and
# creates real spans
with tracer.start_span("") as span:
self.assertIsInstance(span, TestSpan)
self.assertIsInstance(span, SpanTest)

def test_late_config(self):
# get a tracer and instrument a function as we would at the
Expand All @@ -100,4 +100,4 @@ def my_function() -> Span:
# configure tracing provider
trace.set_tracer_provider(TestProvider())
# call function again, we should now be getting a TestSpan
self.assertIsInstance(my_function(), TestSpan)
self.assertIsInstance(my_function(), SpanTest)
4 changes: 4 additions & 0 deletions opentelemetry-semantic-conventions/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]

dependencies = [
"opentelemetry-api == 1.25.0.dev",
]

[project.urls]
Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-semantic-conventions"

Expand Down
Loading

0 comments on commit 13cc549

Please sign in to comment.