Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/resource-detector-azure

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resource-detector-azure

OpenTelemetry SDK resource detector for Azure

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
280K
decreased by-50.42%
Maintainers
3
Weekly downloads
 
Created
Source

OpenTelemetry Resource Detector for Azure

[![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image]

component owners: @JacksonWeber

Resource detector for Azure.

Installation

npm install --save @opentelemetry/resource-detector-azure

Usage

import { detectResources } from '@opentelemetry/resources';
import { azureAppServiceDetector } from '@opentelemetry/resource-detector-azure';
const resource = detectResourcesSync({
    detectors: [azureAppServiceDetector],
});

const tracerProvider = new NodeTracerProvider({ resource });

Available Detectors

App Service Resource Detector

AttributeDescription
azure.app.service.stampThe specific "stamp" cluster within Azure where the App Service is running, e.g., "waws-prod-sn1-001".
cloud.platformThe cloud platform. Here, it's always "azure_app_service".
cloud.providerThe cloud service provider. In this context, it's always "azure".
cloud.resource_idThe Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}".
cloud.regionThe Azure region where the App Service is hosted, e.g., "East US", "West Europe", etc.
deployment.environmentThe deployment slot where the Azure App Service is running, such as "staging", "production", etc.
host.idThe primary hostname for the app, excluding any custom hostnames.
service.instance.idThe specific instance of the Azure App Service, useful in a scaled-out configuration.
service.nameThe name of the Azure App Service.

VM Resource Detector

AttributeDescription
azure.vm.scaleset.nameThe name of the Virtual Machine Scale Set if the VM is part of one.
azure.vm.skuThe SKU of the Azure Virtual Machine's operating system. For instance, for a VM running Windows Server 2019 Datacenter edition, this value would be "2019-Datacenter".
cloud.platformThe cloud platform, which is always set to "azure_vm" in this context.
cloud.providerThe cloud service provider, which is always set to "azure" in this context.
cloud.regionThe Azure region where the Virtual Machine is hosted, such as "East US", "West Europe", etc.
cloud.resource_idThe Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}".
host.idA unique identifier for the VM host, for instance, "02aab8a4-74ef-476e-8182-f6d2ba4166a6".
host.nameThe name of the host machine.
host.typeThe size of the VM instance, for example, "Standard_D2s_v3".
os.typeThe type of operating system running on the VM, such as "Linux" or "Windows".
os.versionThe version of the operating system running on the VM.
service.instance.idAn identifier for a specific instance of the service running on the Azure VM, for example, "02aab8a4-74ef-476e-8182-f6d2ba4166a6".

Azure Functions Resource Detector

AttributeDescription
cloud.platformThe cloud platform. Here, it's always "azure_functions".
cloud.providerThe cloud service provider. In this context, it's always "azure".
cloud.regionThe Azure region where the Azure Function is hosted, e.g., "East US", "West Europe", etc.
faas.instanceThe specific instance of the Azure App Service, useful in a scaled-out configuration.
faas.nameThe name of the Azure App Service.
faas.versionThe version of the Azure Function being executed, e.g., "~4".
faas.max_memoryThe amount of memory available to the Azure Function expressed in MiB.

FAQs

Package last updated on 04 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc