Skip to content

feat(otlp): align resource and scope with OTel spec, record S3 region - #545

Open
arjun-rajappa wants to merge 2 commits into
masterfrom
otlp-resource-scope-fixes
Open

arjun-rajappa wants to merge 2 commits into
masterfrom
otlp-resource-scope-fixes

Conversation

@arjun-rajappa

Copy link
Copy Markdown
Contributor

Why

The OTLP exporter's resource and instrumentation scope output differs from the OTel semconv v1.41.0 spec. The scope name is wrong, host.id is missing on macOS, container IDs are missed on cgroup v2, Azure Functions are not detected, and S3 spans never carry cloud.region because the instrumentation does not record it.

What

  • base_converter.rb: scope name changed from instana-ruby to instana.ruby.tracer
  • resource.rb:
    • host.id is read from ioreg (IOPlatformUUID) on macOS. Linux behaviour is unchanged
    • Container ID detection also matches docker-<id>.scope, cri-containerd-, crio- and libpod- cgroup v1 paths. On cgroup v2 it falls back to /proc/self/mountinfo.
    • Azure Functions detection from FUNCTIONS_WORKER_RUNTIME and WEBSITE_SITE_NAME, setting cloud.provider=azure and cloud.platform=azure_functions. It uses environment variables only, with no metadata-service call .
  • aws_sdk_s3.rb: S3 spans now record region from context.config.region. The existing converter already maps it to the cloud.region span attribute.
  • Tests added or updated in resource_test.rb, base_converter_test.rb and aws_test.rb. Existing Linux host_id tests are pinned to Linux so they do not depend on the host OS.

Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
@arjun-rajappa arjun-rajappa self-assigned this Nov 23, 2026
@arjun-rajappa
arjun-rajappa requested a review from a team November 23, 2026 06:31
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant