Skip to content

Commit

Permalink
Implement opentelemetry mutable baggage
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotorres97 committed Oct 27, 2023
1 parent d1eff9c commit ae4b31d
Show file tree
Hide file tree
Showing 22 changed files with 10,000 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage
dist
node_modules
!.release-it.js
13 changes: 13 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
env:
node: true
extends:
- eslint:recommended
- uphold
- plugin:@typescript-eslint/recommended
parser: '@typescript-eslint/parser'
parserOptions:
sourceType: module
plugins:
- '@typescript-eslint'
- vitest
root: true
51 changes: 51 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
workflow_dispatch:
inputs:
PACKAGE:
description: 'The package you wish to release'
type: choice
options:
- opentelemetry-mutable-baggage
required: true
VERSION_BUMP:
description: 'The version bump'
type: choice
options:
- major
- minor
- patch
default: minor
required: true

jobs:
release:
runs-on: ubuntu-latest
concurrency: 1
environment: release

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}

- name: Setup Node.js version
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install node packages
run: npm ci --workspace ${{ github.event.inputs.PACKAGE }}

- name: Configure git
run: |
git config user.name "Uphold"
git config user.email "[email protected]"
- name: Generate release
env:
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
run: npm run release --workspace ${{ github.event.inputs.PACKAGE }} -- --increment ${{ github.event.inputs.VERSION_BUMP }} -V
34 changes: 34 additions & 0 deletions .github/workflows/tests.opentelemetry-mutable-baggage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests - opentelemetry-mutable-baggage

on:
push:
paths:
- '*'
- 'packages/opentelemetry-mutable-baggage/**'

jobs:
unit:
runs-on: ubuntu-latest
env:
NPM_WORKSPACE: packages/opentelemetry-mutable-baggage

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js version
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint --workspace $NPM_WORKSPACE

- name: Run tests
env:
VITEST_MAX_THREADS: 2
VITEST_MIN_THREADS: 1
run: npm run test --workspace $NPM_WORKSPACE
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.dump
*.dump.bz2.gpg
.eslintcache
coverage
dist
node_modules
npm-debug.log*
yarn.lock
19 changes: 19 additions & 0 deletions .release-it.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
git: {
changelog: 'echo "## Changelog\\n\\n$(npx @uphold/github-changelog-generator -f unreleased | tail -n +4 -f)"',
commitMessage: 'Release ${name}@${version}',
requireCommits: true,
tagName: '${name}@v${version}'
},
github: {
release: true,
releaseName: '${name}@v${version}'
},
hooks: {
'after:bump': `
npm run build &&
echo "$(npx @uphold/github-changelog-generator -f \${version} -t v\${version})\n$(tail -n +2 CHANGELOG.md)" > CHANGELOG.md &&
git add dist CHANGELOG.md --all
`
}
};
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# opentelemetry-js-contrib

A repository for [OpenTelemetry](https://opentelemetry.io/) JavaScript contributions made by Uphold.

## Packages

This repository is setup as a mono-repository and all packages live under [`packages`](./packages).

| Name | Description |
|------|-------------|
| [`@uphold/opentelemetry-mutable-baggage`](./packages/opentelemetry-mutable-baggage/) | Package that allows an OpenTelemetry baggage to be mutable |

## Tests

```sh
npm test
```

## License

All packages are licensed under MIT.
Loading

0 comments on commit ae4b31d

Please sign in to comment.