Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/solarwinds/apm-python/compare/rel-5.2.1...HEAD)
## [Unreleased](https://github.com/solarwinds/apm-python/compare/rel-6.0.0...HEAD)

## [6.0.0.0](https://github.com/solarwinds/apm-python/releases/tag/rel-6.0.0) - 2026-03-24

### Changed
- Replaced legacy `TransactionName` attribute with `sw.transaction` ([#748](https://github.com/solarwinds/apm-python/pull/748))
- Breaking: upgraded to OTel Python 1.40.0/0.61.b0 and changed Logging SDK configuration ([#749](https://github.com/solarwinds/apm-python/pull/749))

## [5.2.1](https://github.com/solarwinds/apm-python/releases/tag/rel-5.2.1) - 2025-12-16

Expand Down
2 changes: 1 addition & 1 deletion image/requirements-nodeps-beta.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
solarwinds_apm==5.2.1.0
solarwinds_apm==6.0.0.0
33 changes: 20 additions & 13 deletions lambda/tests/test_instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@
TRACE_ID_FIRST_PART_LENGTH,
TRACE_ID_VERSION,
)
from opentelemetry.semconv.resource import ResourceAttributes
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.semconv._incubating.attributes.cloud_attributes import (
CLOUD_ACCOUNT_ID,
CLOUD_RESOURCE_ID,
)
from opentelemetry.semconv._incubating.attributes.faas_attributes import (
FAAS_INVOCATION_ID,
)
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import SpanKind
from opentelemetry.trace.propagation.tracecontext import (
Expand All @@ -46,16 +51,26 @@


class MockLambdaContext:
def __init__(self, aws_request_id, invoked_function_arn):
def __init__(self, function_name, aws_request_id, invoked_function_arn):
self.function_name = function_name
self.invoked_function_arn = invoked_function_arn
self.aws_request_id = aws_request_id


MOCK_LAMBDA_CONTEXT = MockLambdaContext(
function_name="myfunction",
aws_request_id="mock_aws_request_id",
invoked_function_arn="arn:aws:lambda:us-east-1:123456:function:myfunction:myalias",
)

MOCK_LAMBDA_CONTEXT_ATTRIBUTES = {
CLOUD_RESOURCE_ID: ":".join(
MOCK_LAMBDA_CONTEXT.invoked_function_arn.split(":")[:7]
),
FAAS_INVOCATION_ID: MOCK_LAMBDA_CONTEXT.aws_request_id,
CLOUD_ACCOUNT_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn.split(":")[4],
}

MOCK_XRAY_TRACE_ID = 0x5FB7331105E8BB83207FA31D4D9CDB4C
MOCK_XRAY_TRACE_ID_STR = f"{MOCK_XRAY_TRACE_ID:x}"
MOCK_XRAY_PARENT_SPAN_ID = 0x3328B8445A6DBAD2
Expand Down Expand Up @@ -201,21 +216,13 @@ def test_active_tracing(self):

self.assertEqual(len(spans), 1)
span = spans[0]
self.assertEqual(span.name, os.environ[ORIG_HANDLER])
self.assertEqual(span.name, MOCK_LAMBDA_CONTEXT.function_name)
self.assertEqual(span.get_span_context().trace_id, MOCK_XRAY_TRACE_ID)
self.assertEqual(span.kind, SpanKind.SERVER)

self.assertSpanHasAttributes(
span,
{
ResourceAttributes.CLOUD_RESOURCE_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn,
SpanAttributes.FAAS_INVOCATION_ID: MOCK_LAMBDA_CONTEXT.aws_request_id,
ResourceAttributes.CLOUD_ACCOUNT_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn.split(
":"
)[
4
],
},
MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
)

parent_context = span.parent
Expand Down
2 changes: 1 addition & 1 deletion solarwinds_apm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.1"
__version__ = "6.0.0.0"
Loading