opentelemetry-resource-detector-container 0.3.0
“Container resource detection helpers for OpenTelemetry”
Ruby loads a relative source moduleSPDX license identifier
SHA-2562ab65b9b63ce76e5a670ef3587a1ce09e36e5f2c3c80d498f2250a2baaaa0160
MaleculeH₂(F₂Os)
Evidence
1# frozen_string_literal: true
2
3# Copyright The OpenTelemetry Authors
4#
5# SPDX-License-Identifier: Apache-2.0
6
7module OpenTelemetry
8 module Resource
9 module Detector
10 # Container contains detect class method for determining container resource attributes
11 module Container
12 extend self
13
14 U …
16:54… N}|#{CONTAINER_PATTERN})(?:.scope)?$/
17 CGROUP_V1_PATH = '/proc/self/cgroup'
18 CGROUP_V2_PATH = '/proc/self/mountinfo'
19
20 # Detects container attributes and creates a {OpenTelemetry::SDK::Resources::Resource} with the specified attributes.
21 # If no container attributes could be determined an empty res …
41:16… UP_V2_PATH, CGROUP_V1_PATH].each do |cgroup|
42 unless File.readable?(cgroup)
43 OpenTelemetry.handle_error(message: "Container resource detector - #{cgroup} could not be read.")
44 …
1# frozen_string_literal: true
2
3# Copyright The OpenTelemetry Authors
4#
5# SPDX-License-Identifier: Apache-2.0
6
7require_relative 'opentelemetry/resource/detector'
No evidence locations were recorded for this file. Raw result