Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Sep 16:11

Added

  • Added the extra_init_code option to the make_lambda_runtime! macro, allowing to pass arbitrary code to be executed just before launching the lambda runtime.
  • Added the sdk_client_interceptor option to the make_lambda_runtime! macro, allowing to explicitly choose the interceptor instead of relying on the default one.
  • Added the lambda_layer_instrumentor option to the make_lambda_runtime! macro, allowing to explicitly choose the instrumentor instead of relying on the default one.
  • The tracing-backend AWS SDK client interceptor now adds the rpc.system.name attribute (Semantic Convention) in addition to the already present (deprecated) rpc.system
  • The xray-no-lambda-node-nesting feature controls if Lambda X-Ray segment should be emitted as nested inside the Lambda function segment or not. Enable the feature to keep the segment separate.
  • Now publicly re-export aws_smithy_runtime_api::{box_error::BoxError, client::interceptors::context, http} under the awssdk-instrumentation::interceptor module to ease implementation of custom SDK client interceptors.w

Changed

  • Bumped MSRV to 1.88
  • Switching to opentelemetry-aws (instead of the tmp crate I published) following the release of v0.21 with all my PRs merged
  • Removed the semconv_experimental feature of opentelemetry-semantic-conventions
  • When looking for the tracing aws_sdk operation span, added a more precise target matching condition: aws_sdk_*::operation::* instead of *::operation::*
  • Made the tracing_subscriber crate a mandatory dependency, but stripping it of un-needed features unless our tracing-backend feature is enabled
  • The X-Ray exporter is now configured to export all the attributes as Metadata by default, aligning with ADOTv2 behavior. The XRAY_METADATA env var no longer accept the "all" value (as it is now the default behavior). If XRAY_METADATA is defined, only listed attributes will be pushed. An empty XRAY_METADATA will prevent the default export-all behavior. Note that XRAY_ANNOTATIONS usage is unchanged.
  • By default, the X-Ray segment emitted for a Lambda function is now nested under the AWS::Lambda::Function node pushed by the service.
  • Changed the top-level span name generated by the Lambda Tracing Layer to Invocation on both tracing-backend and otel-backend
  • The default OTelFaasTrigger variant is now Http (instead of DataSource), aligning with the default value already chosen by the make_lambda_runtime! macro.

Removed

  • Removed the env module entirely and instead rely on the new Resource Detectors of the opentelemetry-aws crate. The public functions env::default_resource(), env::lambda::lambda_resource(), env::ecs::ecs_resource(), env::eks::eks_resource() and env::ec2::ec2_resource() are gone with it.
  • Removed the custom defined RPC_SYSTEM_NAME and DB_SYSTEM_NAME consts and uses the ones of opentelemetry-semantic-conventions
  • Removed the cloud.account.id attribute from the Lambda Tracing layer as it is covered by the opentelemetry-aws Resource Detector

Fixed

  • Fixed the OTel backend bug that would produce a handler span containing only the xray_trace_id, without any of the Lambda attributes
  • Fixed the otel-backend bug that could not find the SDK operation span when the tracing-backend feature was disabled.
  • For Lambda, added the service.name attribute with the function name as its value, pending addition to the Lambda resource detector.

Breaking changes

  • The env module and all its public functions have been removed. Resource detection is now delegated to the Resource Detectors of the opentelemetry-aws crate, and every enabled env-* feature now pulls in that crate.
  • The interceptor::DB_SYSTEM_NAME and interceptor::RPC_SYSTEM_NAME constants have been removed. Use opentelemetry_semantic_conventions::attribute::DB_SYSTEM_NAME and ::RPC_SYSTEM_NAME instead.
  • tracing-subscriber is now a mandatory dependency. default_telemetry_init() now always installs a tracing subscriber implementing LookupSpan, including when only otel-backend is enabled, because the interceptor needs it to locate the AWS SDK operation span. Users composing their own subscriber stack with default_tracer_provider() must install such a subscriber themselves.
  • The top-level span emitted by the Lambda Tracing Layer is now named Invocation on both backends (it used to be named after AWS_LAMBDA_FUNCTION_NAME on otel-backend and Lambda runtime invoke on tracing-backend) and now has internal kind by default instead of server. Enable the new xray-no-lambda-node-nesting feature to get the previous server kind back.
  • The cloud.account.id attribute is no longer set on the Lambda invocation span. It is now provided as a resource attribute by the opentelemetry-aws Lambda Resource Detector.
  • The XRAY_METADATA environment variable no longer accepts the all value, because exporting all attributes as metadata is now the default. Setting XRAY_METADATA to an empty value prevents the default export-all behavior. XRAY_ANNOTATIONS is unchanged.
  • The default OTelFaasTrigger variant is now Http (instead of DataSource). Breaking if your code uses TracingLayer::new() without .with_trigger(...).

All Changes