Skip to content

Commit

Permalink
Remove compatibility with inception-health/otel-upload-test-artifact-…
Browse files Browse the repository at this point in the history
…action (#39)
  • Loading branch information
corentinmusard authored Jan 4, 2025
1 parent 3d51c7a commit 151a8c9
Show file tree
Hide file tree
Showing 32 changed files with 27,016 additions and 47,147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/axiom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Export workflow to Axiom
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: https://api.axiom.co/v1/traces
# Example value for AXIOM_OTLP_HEADERS:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ jobs:
run: npm ci
- name: run tests
run: npm run test:ci
- uses: inception-health/otel-upload-test-artifact-action@v1
if: always()
with:
jobName: "tests (${{ matrix.os }})"
stepName: "run tests"
path: "junit.xml"
type: "junit"
githubToken: ${{ secrets.GITHUB_TOKEN }}
otel-cicd:
needs: [tests, build]
if: always()
Expand All @@ -60,4 +52,4 @@ jobs:
otlpHeaders: "test"
githubToken: ${{ secrets.GITHUB_TOKEN }}
env:
OTEL_CONSOLE_ONLY: "true"
OTEL_CONSOLE_ONLY: "true" # Internal flag used to disable sending data to the collector
2 changes: 1 addition & 1 deletion .github/workflows/dash0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Export workflow to Dash0
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: grpc://ingress.eu-west-1.aws.dash0.com:4317
# See https://www.dash0.com/documentation/dash0/get-started/sending-data-to-dash0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/honeycomb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Export workflow to Honeycomb
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
# Example value for HONEYCOMB_OTLP_HEADERS:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/newrelic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Export workflow to New Relic
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: grpc://otlp.eu01.nr-data.net
# Example value for NEWRELIC_OTLP_HEADERS:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [completed]

jobs:
otel-export-axiom:
otel-export-private:
runs-on: ubuntu-latest
# Permissions can be set on a per-job basis or at the top level
permissions:
Expand All @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Export workflow
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: "CHANGE_ME"
otlpHeaders: "CHANGE_ME"
Expand Down
118 changes: 1 addition & 117 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,125 +1,9 @@
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
# Coverage directory used by istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
lib

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Taskfile
.task

.DS_Store

docker/

!./dist/index.js
./src/*.js
!jest.config.js
!.dependency-cruiser.js
*.d.ts
node_modules
.node-version

# CDK asset staging directory
.cdk.staging
cdk.out

# Test Reports
junit.xml
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0] - 2025-01-04

### ⚠ BREAKING CHANGES

- Removed compatibility with [inception-health/otel-upload-test-artifact-action](https://github.com/inception-health/otel-upload-test-artifact-action) action. It is based on `@actions/artifact` prior to `v2` which is deprecated since June 2024 and will be removed in [January 30th, 2025](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). If you were using this action, please open an issue to discuss your use case.
- Removed `github.author_name` attribute, use `github.head_commit.author.name` instead
- Removed `github.author_email` attribute, use `github.head_commit.author.email` instead

### Changed

- Changed licence under my name (still MIT)

## [1.13.2] - 2025-01-04

### Fixed
Expand Down Expand Up @@ -123,7 +135,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for `https` endpoints (proto over http).
- Update to node 20.x

[unreleased]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.2...HEAD
[unreleased]: https://github.com/corentinmusard/otel-cicd-action/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.2...v2.0.0
[1.13.2]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.1...v1.13.2
[1.13.1]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.0...v1.13.1
[1.13.0]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.12.1...v1.13.0
Expand Down
72 changes: 5 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This action exports Github CI/CD workflows to any endpoint compatible with OpenT

This is a fork of [otel-export-trace-action](https://github.com/inception-health/otel-export-trace-action) with more features and better support.

Compliant with OpenTelemetry [CICD semconv](https://opentelemetry.io/docs/specs/semconv/attributes-registry/cicd/).
Look at [Sample OpenTelemetry Output](./src/__assets__/output.txt) for the list of attributes and their values.

![Example](./docs/honeycomb-example.png)

## Usage
Expand Down Expand Up @@ -40,7 +43,7 @@ jobs:
otel-cicd-actions:
runs-on: ubuntu-latest
steps:
- uses: corentinmusard/otel-cicd-action@v1
- uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
Expand All @@ -61,7 +64,7 @@ jobs:
needs: [build] # must run when all jobs are completed
steps:
- name: Export workflow
uses: corentinmusard/otel-cicd-action@v1
uses: corentinmusard/otel-cicd-action@v2
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
Expand Down Expand Up @@ -107,71 +110,6 @@ permissions:
| ------- | ------------------------------------------- |
| traceId | The OpenTelemetry Trace ID of the root span |

Look at [Sample OpenTelemetry Output](./src/__assets__/output.txt) for the list of attributes and their values.

#### Honeycomb Example Trace

![HoneyComb Example](./docs/honeycomb-example.png)

_with JUnit traces_
![HoneyComb Junit Example](./docs/honeycomb-junit-example.png)

## With Junit Tracing

Combined with [OpenTelemetry Upload Trace Artifact](https://github.com/marketplace/actions/opentelemetry-upload-trace-artifact) this action will Download the OTLP Trace Log Artifact uploaded from the Workflow Run and export it.

**pr-workflow.yml**

```yaml
name: "PR check"
on:
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: run tests
run: npm run test:ci
- uses: inception-health/otel-upload-test-artifact-action@v1
if: always()
with:
jobName: "build-and-test"
stepName: "run tests"
path: "junit.xml"
type: "junit"
githubToken: ${{ secrets.GITHUB_TOKEN }}
```

**otel-cicd.yml**

```yaml
name: OpenTelemetry Export Traces
on:
workflow_run:
workflows: ["PR check"]
types: [completed]
jobs:
otel-cicd-action:
runs-on: ubuntu-latest
steps:
- name: Export Workflow Traces
uses: corentinmusard/otel-cicd-action@v1
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
runId: ${{ github.event.workflow_run.id }}
```

[ci-img]: https://github.com/corentinmusard/otel-cicd-action/actions/workflows/build.yml/badge.svg?branch=main
[ci]: https://github.com/corentinmusard/otel-cicd-action/actions/workflows/build.yml?query=branch%3Amain
[license-img]: https://img.shields.io/github/license/corentinmusard/otel-cicd-action
3 changes: 0 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"complexity": {
"useLiteralKeys": "off",
"noExcessiveCognitiveComplexity": "info"
},
"performance": {
"noAccumulatingSpread": "off"
}
}
},
Expand Down
Loading

0 comments on commit 151a8c9

Please sign in to comment.