Skip to content

Commit

Permalink
Merge branch 'main' into feature/config-links-amqp-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
McSick authored Apr 3, 2024
2 parents 94b6e2a + 17a0bc1 commit 3504de9
Show file tree
Hide file tree
Showing 143 changed files with 4,345 additions and 1,913 deletions.
1 change: 1 addition & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ components:
plugins/node/opentelemetry-instrumentation-runtime-node:
- d4nyll
plugins/node/opentelemetry-instrumentation-pg:
- maryliag
- rauno56
plugins/node/opentelemetry-instrumentation-pino:
- seemk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
node: ["14", "16", "18.18.2"]
include:
- node: 14
- node: 18.18.2
code-coverage: true
runs-on: ubuntu-latest
services:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.7","detectors/node/opentelemetry-resource-detector-aws":"1.4.0","detectors/node/opentelemetry-resource-detector-azure":"0.2.5","detectors/node/opentelemetry-resource-detector-container":"0.3.7","detectors/node/opentelemetry-resource-detector-gcp":"0.29.7","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.7.0","metapackages/auto-instrumentations-node":"0.43.0","metapackages/auto-instrumentations-web":"0.37.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.7","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.37.0","packages/winston-transport": "0.1.0","plugins/node/instrumentation-amqplib":"0.35.0","plugins/node/instrumentation-cucumber":"0.4.0","plugins/node/instrumentation-dataloader":"0.7.0","plugins/node/instrumentation-fs":"0.10.0","plugins/node/instrumentation-lru-memoizer":"0.35.0","plugins/node/instrumentation-mongoose":"0.36.0","plugins/node/instrumentation-runtime-node":"0.2.1","plugins/node/instrumentation-socket.io":"0.37.0","plugins/node/instrumentation-tedious":"0.8.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.39.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.39.1","plugins/node/opentelemetry-instrumentation-bunyan":"0.36.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.36.0","plugins/node/opentelemetry-instrumentation-connect":"0.34.0","plugins/node/opentelemetry-instrumentation-dns":"0.34.0","plugins/node/opentelemetry-instrumentation-express":"0.36.1","plugins/node/opentelemetry-instrumentation-fastify":"0.34.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.34.0","plugins/node/opentelemetry-instrumentation-graphql":"0.38.1","plugins/node/opentelemetry-instrumentation-hapi":"0.35.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.38.0","plugins/node/opentelemetry-instrumentation-knex":"0.34.0","plugins/node/opentelemetry-instrumentation-koa":"0.38.0","plugins/node/opentelemetry-instrumentation-memcached":"0.34.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.41.0","plugins/node/opentelemetry-instrumentation-mysql":"0.36.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.36.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.35.0","plugins/node/opentelemetry-instrumentation-net":"0.34.0","plugins/node/opentelemetry-instrumentation-pg":"0.39.1","plugins/node/opentelemetry-instrumentation-pino":"0.36.0","plugins/node/opentelemetry-instrumentation-redis":"0.37.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.37.0","plugins/node/opentelemetry-instrumentation-restify":"0.36.0","plugins/node/opentelemetry-instrumentation-router":"0.35.0","plugins/node/opentelemetry-instrumentation-winston":"0.35.0","plugins/web/opentelemetry-instrumentation-document-load":"0.36.0","plugins/web/opentelemetry-instrumentation-long-task":"0.36.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.36.0","plugins/web/opentelemetry-plugin-react-load":"0.30.0","propagators/opentelemetry-propagator-aws-xray":"1.3.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.27.1","propagators/opentelemetry-propagator-instana":"0.3.1","propagators/opentelemetry-propagator-ot-trace":"0.27.1"}
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.8","detectors/node/opentelemetry-resource-detector-aws":"1.4.1","detectors/node/opentelemetry-resource-detector-azure":"0.2.6","detectors/node/opentelemetry-resource-detector-container":"0.3.8","detectors/node/opentelemetry-resource-detector-gcp":"0.29.8","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.8.0","metapackages/auto-instrumentations-node":"0.44.0","metapackages/auto-instrumentations-web":"0.38.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.8","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.38.0","packages/winston-transport":"0.2.0","plugins/node/instrumentation-amqplib":"0.36.0","plugins/node/instrumentation-cucumber":"0.5.0","plugins/node/instrumentation-dataloader":"0.8.0","plugins/node/instrumentation-fs":"0.11.0","plugins/node/instrumentation-lru-memoizer":"0.36.0","plugins/node/instrumentation-mongoose":"0.37.0","plugins/node/instrumentation-runtime-node":"0.3.0","plugins/node/instrumentation-socket.io":"0.38.0","plugins/node/instrumentation-tedious":"0.9.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.40.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.40.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.37.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.37.0","plugins/node/opentelemetry-instrumentation-connect":"0.35.0","plugins/node/opentelemetry-instrumentation-dns":"0.35.0","plugins/node/opentelemetry-instrumentation-express":"0.37.0","plugins/node/opentelemetry-instrumentation-fastify":"0.35.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.35.0","plugins/node/opentelemetry-instrumentation-graphql":"0.39.0","plugins/node/opentelemetry-instrumentation-hapi":"0.36.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.39.0","plugins/node/opentelemetry-instrumentation-knex":"0.35.0","plugins/node/opentelemetry-instrumentation-koa":"0.39.0","plugins/node/opentelemetry-instrumentation-memcached":"0.35.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.42.0","plugins/node/opentelemetry-instrumentation-mysql":"0.37.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.37.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.36.0","plugins/node/opentelemetry-instrumentation-net":"0.35.0","plugins/node/opentelemetry-instrumentation-pg":"0.40.0","plugins/node/opentelemetry-instrumentation-pino":"0.37.0","plugins/node/opentelemetry-instrumentation-redis":"0.38.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.38.0","plugins/node/opentelemetry-instrumentation-restify":"0.37.0","plugins/node/opentelemetry-instrumentation-router":"0.36.0","plugins/node/opentelemetry-instrumentation-winston":"0.36.0","plugins/web/opentelemetry-instrumentation-document-load":"0.37.0","plugins/web/opentelemetry-instrumentation-long-task":"0.37.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.37.0","plugins/web/opentelemetry-plugin-react-load":"0.30.0","propagators/opentelemetry-propagator-aws-xray":"1.3.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.27.1","propagators/opentelemetry-propagator-instana":"0.3.1","propagators/opentelemetry-propagator-ot-trace":"0.27.1"}
89 changes: 70 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

We'd love your help!

- [Development Quick Start](#development-quick-start)
- [Report a bug or requesting feature](#report-a-bug-or-requesting-feature)
- [How to contribute](#how-to-contribute)
- [Before you start](#before-you-start)
- [Conventional commit](#conventional-commit)
- [Fork](#fork)
- [Running the tests](#running-the-tests)
- [Generating API documentation](#generating-api-documentation)
- [Generating CHANGELOG documentation](#generating-changelog-documentation)
- [Development](#development)
- [Tools used](#tools-used)
- [General guidance](#general-guidance)
- [CHANGELOG](#changelog)
- [Benchmarks](#benchmarks)
- [Component Ownership](#component-ownership)
- [Component Lifecycle](#component-lifecycle)
Expand All @@ -19,10 +21,25 @@ We'd love your help!
- [Stable](#stable)
- [Unmaintained](#unmaintained)
- [Deprecated](#deprecated)
- [Pull Request Merge Guidelines](#pull-request-merge-guidelines)
- [General Merge Requirements](#general-merge-requirements)
- [Contributing Vendor Components](#contributing-vendor-components)
- [Adding a New Vendor Component](#adding-a-new-vendor-component)
- [Removing Vendor Components](#removing-vendor-components)

## Development Quick Start

To get the project started quickly, you can follow these steps. For more
detailed instructions, see [development](#development) below.

```sh
git clone https://github.com/open-telemetry/opentelemetry-js-contrib.git
cd opentelemetry-js-contrib
npm ci
npm run compile
npm test
```

## Report a bug or requesting feature

Reporting bugs is an important contribution. Please make sure to include:
Expand Down Expand Up @@ -71,18 +88,44 @@ Remember to always work in a branch of your local copy, as you might otherwise h

Please also see [GitHub workflow](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md#github-workflow) section of general project contributing guide.

### Running the tests
## Development

### Tools used

- [NPM](https://npmjs.com)
- [TypeScript](https://www.typescriptlang.org/)
- [lerna](https://github.com/lerna/lerna) to manage dependencies, compilations, and links between packages. Most lerna commands should be run by calling the provided npm scripts.
- [npm workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces)
- [MochaJS](https://mochajs.org/) for tests
- [eslint](https://eslint.org/)

Refer to the core repository for [supported runtimes](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes).
Refer to the root-level [package.json](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/package.json) for shared dev dependency versions, and the package-level package.json for package-specific versions if different or not included in the shared root.

### General guidance

The `opentelemetry-js-contrib` project is written in TypeScript.

- `npm install` to install dependencies.
As a general rule, installing and then compiling from the root directory should always be done first before anything else.
After making changes to a specific package, compile again from the specific package directory you are working in.
Some tests depend on other packages to be installed, so these steps are also required for running tests.

- `npm ci` installs dependencies ([see npm-ci docs](https://docs.npmjs.com/cli/v10/commands/npm-ci))
- `npm run compile` compiles the code, checking for type errors.
- `npm test` tests code the same way that our CI will test it.
- `npm run lint:fix` lint (and maybe fix) any changes.
- `npm test` runs most unit tests, though some packages require other dependencies so are only run in CI or with a separate command in the package's `package.json` file.
- `npm run lint:fix` lint any changes and fix if needed.

Each of these commands can also be run in individual packages, as long as the initial install and compile are done first in the root directory.

### CHANGELOG

The conventional commit type (in PR title) is very important to automatically bump versions on release. For instance:

### Generating CHANGELOG documentation
- any type + `!` will bump major version (or minor on pre-release)
- `feat` will bump minor
- `fix` will bump patch

- `npm run changelog` to generate CHANGELOG documentation in your terminal (see [RELEASING.md](RELEASING.md) for more details).
There is no need to update the CHANGELOG in a PR because it will be updated as part of the release process (see [RELEASING.md](RELEASING.md) for more details).

### Benchmarks

Expand Down Expand Up @@ -154,9 +197,25 @@ They may not work and there are no guarantees for fixes or new features.
Their source files may be deleted from the repository.
Any packages released from their source will be marked as deprecated in NPM.

## Pull Request Merge Requirements
## Pull Request Merge Guidelines

Pull requests MAY be merged by an approver OR a maintainer provided they meet all the following [General Merge Requirements](#general-merge-requirements).
All requirements are at the discretion of the maintainers.
Maintainers MAY merge pull requests which have not strictly met these requirements.
Maintainers MAY close, block, or put on hold pull requests even if they have strictly met these requirements.

It is generally expected that a maintainer ([@open-telemetry/javascript-maintainers](https://github.com/orgs/open-telemetry/teams/javascript-maintainers)) should review and merge major changes.
Some examples include, but are not limited to:

- Breaking changes
- New modules
- Changes which affect runtime support

If a PR has not been interacted with by a reviewer within one week, please ping the component
owners as listed in [.github/component_owners.yml](.github/component_owners.yml), if component owners are unresponsive
please ping ([@open-telemetry/javascript-approvers](https://github.com/orgs/open-telemetry/teams/javascript-approvers)).

Pull requests MAY be merged by an approver OR a maintainer provided they meet all the following requirements:
### General Merge Requirements

- Approved by
- at least one component owner if one is defined in [.github/component_owners.yml](.github/component_owners.yml)
Expand All @@ -173,14 +232,6 @@ Pull requests MAY be merged by an approver OR a maintainer provided they meet al
- New or changed functionality is documented if appropriate
- Substantial changes should not be merged within 24 hours of opening in order to allow reviewers from all time zones to have a chance to review

All requirements are at the discretion of the maintainers.
Maintainers MAY merge pull requests which have not strictly met these requirements.
Maintainers MAY close, block, or put on hold pull requests even if they have strictly met these requirements.

If a PR has not been interacted with by a reviewer within one week, please ping the component
owners as listed in [.github/component_owners.yml](.github/component_owners.yml), if component owners are unresponsive
please ping ([@open-telemetry/javascript-approvers](https://github.com/orgs/open-telemetry/teams/javascript-approvers)).

## Contributing Vendor Components

This repo is generally meant for hosting components that work with popular open-source frameworks and tools. However, it is also possible to contribute components specific to a 3rd party vendor in this repo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0

## [0.28.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.7...resource-detector-alibaba-cloud-v0.28.8) (2024-04-03)


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0

## [0.28.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.0...resource-detector-alibaba-cloud-v0.28.1) (2023-08-14)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ const tracerProvider = new NodeTracerProvider({ resource });

## Available detectors

- `alibabaCloudEcsDetector`: Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https://www.alibabacloud.com/product/ecs).
### Alibaba Cloud Ecs Detector

Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https://www.alibabacloud.com/product/ecs). More info about Alibaba Instance Identities can be found [here](https://www.alibabacloud.com/help/en/ecs/user-guide/use-instance-identities).

| Resource Attribute | Description |
|-------------------------|-----------------------------------------------------------------|
| cloud.account.id | Value of `owner-account-id` on Alibaba Cloud |
| cloud.availability_zone | Value of `zone-id` on Alibaba Cloud |
| cloud.platform | In this context, it's always `alibaba_cloud_ecs` |
| cloud.provider | In this context, it's always `alibaba_cloud` |
| cloud.region | Value of `region-id` on Alibaba Cloud |
| host.id | Value of `instance-id` on Alibaba Cloud |
| host.name | The hostname for the app, retrieve from the `hostname` endpoint |
| host.type | Value of `instance-type` on Alibaba Cloud |

[resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-alibaba-cloud",
"version": "0.28.7",
"version": "0.28.8",
"description": "OpenTelemetry resource detector for Alibaba Cloud",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.37.0",
"@opentelemetry/contrib-test-utils": "^0.38.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand All @@ -57,7 +57,7 @@
},
"dependencies": {
"@opentelemetry/resources": "^1.0.0",
"@opentelemetry/semantic-conventions": "^1.0.0"
"@opentelemetry/semantic-conventions": "^1.22.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-alibaba-cloud#readme"
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ import {
ResourceDetectionConfig,
} from '@opentelemetry/resources';
import {
CloudPlatformValues,
CloudProviderValues,
SemanticResourceAttributes,
CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,
CLOUDPROVIDERVALUES_ALIBABA_CLOUD,
SEMRESATTRS_CLOUD_ACCOUNT_ID,
SEMRESATTRS_CLOUD_AVAILABILITY_ZONE,
SEMRESATTRS_CLOUD_PLATFORM,
SEMRESATTRS_CLOUD_PROVIDER,
SEMRESATTRS_CLOUD_REGION,
SEMRESATTRS_HOST_ID,
SEMRESATTRS_HOST_NAME,
SEMRESATTRS_HOST_TYPE,
} from '@opentelemetry/semantic-conventions';
import * as http from 'http';

Expand Down Expand Up @@ -61,16 +68,14 @@ class AlibabaCloudEcsDetector implements Detector {
const hostname = await this._fetchHost();

return new Resource({
[SemanticResourceAttributes.CLOUD_PROVIDER]:
CloudProviderValues.ALIBABA_CLOUD,
[SemanticResourceAttributes.CLOUD_PLATFORM]:
CloudPlatformValues.ALIBABA_CLOUD_ECS,
[SemanticResourceAttributes.CLOUD_ACCOUNT_ID]: accountId,
[SemanticResourceAttributes.CLOUD_REGION]: region,
[SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE]: availabilityZone,
[SemanticResourceAttributes.HOST_ID]: instanceId,
[SemanticResourceAttributes.HOST_TYPE]: instanceType,
[SemanticResourceAttributes.HOST_NAME]: hostname,
[SEMRESATTRS_CLOUD_PROVIDER]: CLOUDPROVIDERVALUES_ALIBABA_CLOUD,
[SEMRESATTRS_CLOUD_PLATFORM]: CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,
[SEMRESATTRS_CLOUD_ACCOUNT_ID]: accountId,
[SEMRESATTRS_CLOUD_REGION]: region,
[SEMRESATTRS_CLOUD_AVAILABILITY_ZONE]: availabilityZone,
[SEMRESATTRS_HOST_ID]: instanceId,
[SEMRESATTRS_HOST_TYPE]: instanceType,
[SEMRESATTRS_HOST_NAME]: hostname,
});
}

Expand Down
Loading

0 comments on commit 3504de9

Please sign in to comment.