{"version":3,"file":"OSDetector.cjs","names":["ATTR_OS_TYPE","normalizeType","platform","ATTR_OS_VERSION","release"],"sources":["../../../../src/detectors/platform/node/OSDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { ATTR_OS_TYPE, ATTR_OS_VERSION } from '../../../semconv';\nimport { platform, release } from 'os';\nimport type { ResourceDetectionConfig } from '../../../config';\nimport type { DetectedResource, ResourceDetector } from '../../../types';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements ResourceDetector {\n  detect(_config?: ResourceDetectionConfig): DetectedResource {\n    const attributes: Attributes = {\n      [ATTR_OS_TYPE]: normalizeType(platform()),\n      [ATTR_OS_VERSION]: release(),\n    };\n    return { attributes };\n  }\n}\n\nexport const osDetector = new OSDetector();\n"],"mappings":";;;;;;;;AAgBA,IAAM,aAAN,MAA6C;CAC3C,OAAO,SAAqD;EAK1D,OAAO,EAAE,YAAA;IAHNA,gBAAAA,eAAeC,cAAAA,eAAAA,GAAcC,GAAAA,SAAAA,CAAS,CAAC;IACvCC,gBAAAA,mBAAAA,GAAkBC,GAAAA,QAAAA,CAAQ;EAEX,EAAE;CACtB;AACF;AAEA,MAAa,aAAa,IAAI,WAAW"}