Benign gem 625,429 installs Download

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

SPDX license identifier container.rb · lines 1–14
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 …
Reads own cgroup (/proc/self/cgroup) container.rb · lines 16–21
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 …
Reads file content with Ruby File.read container.rb · lines 41–44
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 …
SPDX license identifier opentelemetry-resource-detector-container.rb · lines 1–7
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

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.