Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Upgrade Otel Packages to use v30+ transform lib #13

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ jobs:
with:
token: "${{ secrets.BUILD_PAT }}"
release-type: node
package-name: otel-upload-test-artifact-action
31,957 changes: 13,562 additions & 18,395 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

412 changes: 411 additions & 1 deletion dist/licenses.txt

Large diffs are not rendered by default.

3,522 changes: 904 additions & 2,618 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.0",
"@opentelemetry/api": "^1.1.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.27.0",
"@opentelemetry/resources": "^1.1.0",
"@opentelemetry/sdk-trace-base": "^1.1.0",
"@opentelemetry/semantic-conventions": "^1.1.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.31.0",
"@opentelemetry/resources": "^1.4.0",
"@opentelemetry/sdk-trace-base": "^1.4.0",
"@opentelemetry/semantic-conventions": "^1.4.0",
"axios": "^0.25.0",
"jszip": "^3.7.1",
"junit2json": "^2.0.6",
"opentelemetry-exporter-trace-otlp-file": "^0.1.1"
"opentelemetry-exporter-trace-otlp-file": "^1.0.3"
},
"devDependencies": {
"@actions/glob": "^0.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/__assets__/junit-testsuites-failed.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="9" failures="1" errors="0" time="3.385">
<testsuite name="createTracerProvider" errors="0" failures="1" skipped="0" timestamp="2022-02-01T18:37:11" time="2.492" tests="5">
<testsuite name="createTracerProvider" errors="0" failures="1" skipped="0" timestamp="2022-02-01T18:37:11Z" time="2.492" tests="5">
<testcase classname="createTracerProvider test service.name resource is workflow name" name="createTracerProvider test service.name resource is workflow name" time="0.019">
</testcase>
<testcase classname="createTracerProvider test service.name resource is workflow id" name="createTracerProvider test service.name resource is workflow id" time="0.023">
Expand All @@ -26,13 +26,13 @@ Received: &quot;1&quot;
<testcase classname="createTracerProvider test active span processor" name="createTracerProvider test active span processor" time="0.002">
</testcase>
</testsuite>
<testsuite name="listWorkflowRunArtifacts" errors="0" failures="0" skipped="0" timestamp="2022-02-01T18:37:14" time="0.159" tests="2">
<testsuite name="listWorkflowRunArtifacts" errors="0" failures="0" skipped="0" timestamp="2022-02-01T18:37:14Z" time="0.159" tests="2">
<testcase classname="listWorkflowRunArtifacts test WorkflowArtifactDownload return to be defined" name="listWorkflowRunArtifacts test WorkflowArtifactDownload return to be defined" time="0.001">
</testcase>
<testcase classname="listWorkflowRunArtifacts test WorkflowArtifactDownload path exists" name="listWorkflowRunArtifacts test WorkflowArtifactDownload path exists" time="0">
</testcase>
</testsuite>
<testsuite name="traceTestReportArtifact" errors="0" failures="0" skipped="0" timestamp="2022-02-01T18:37:14" time="0.552" tests="2">
<testsuite name="traceTestReportArtifact" errors="0" failures="0" skipped="0" timestamp="2022-02-01T18:37:14Z" time="0.552" tests="2">
<testcase classname="traceTestReportArtifact test report type not supported" name="traceTestReportArtifact test report type not supported" time="0.004">
</testcase>
<testcase classname="traceTestReportArtifact test junit spans match snapshot" name="traceTestReportArtifact test junit spans match snapshot" time="0.009">
Expand Down
2 changes: 1 addition & 1 deletion src/__assets__/junit-testsuites.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<testcase classname="createTracerProvider test active span processor" name="createTracerProvider test active span processor" time="0.003">
</testcase>
</testsuite>
<testsuite name="traceTestReportArtifact" errors="0" failures="0" skipped="0" timestamp="2022-01-22T04:45:33" time="0.178" tests="1">
<testsuite name="traceTestReportArtifact" errors="0" failures="0" skipped="0" timestamp="2022-01-22T04:45:33Z" time="0.178" tests="1">
<testcase classname="traceTestReportArtifact test junit.xml" name="traceTestReportArtifact test junit.xml" time="0.001">
</testcase>
</testsuite>
Expand Down
14 changes: 14 additions & 0 deletions src/__snapshots__/trace-provider.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`createTracerProvider test end-to-end junit trace should match snapshot: trace-junit-testsuites 1`] = `
"{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"0fc910cbb439a292\\",\\"parentSpanId\\":\\"0122f5d88af36ea3\\",\\"name\\":\\"createTracerProvider test service.name resource\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740631013000000,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.name resource\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Case\\"}},{\\"key\\":\\"test.classname\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.name resource\\"}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.013}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"0e0a8a9c24a643d4\\",\\"parentSpanId\\":\\"0122f5d88af36ea3\\",\\"name\\":\\"createTracerProvider test service.instance.id resource\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740631029000000,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.instance.id resource\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Case\\"}},{\\"key\\":\\"test.classname\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.instance.id resource\\"}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.029}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"55caeab7808a147e\\",\\"parentSpanId\\":\\"0122f5d88af36ea3\\",\\"name\\":\\"createTracerProvider test service.namespace resource\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740631002000100,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.namespace resource\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Case\\"}},{\\"key\\":\\"test.classname\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test service.namespace resource\\"}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.002}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"83fc16ad11cbf025\\",\\"parentSpanId\\":\\"0122f5d88af36ea3\\",\\"name\\":\\"createTracerProvider test active span processor\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740631003000000,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test active span processor\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Case\\"}},{\\"key\\":\\"test.classname\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider test active span processor\\"}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.003}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"0122f5d88af36ea3\\",\\"parentSpanId\\":\\"aed87033c3371f0d\\",\\"name\\":\\"createTracerProvider\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740634581000200,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"createTracerProvider\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Suite\\"}},{\\"key\\":\\"test.tests\\",\\"value\\":{\\"intValue\\":4}},{\\"key\\":\\"test.failures\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.errors\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":3.581}},{\\"key\\":\\"test.skips\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.html_url\\",\\"value\\":{\\"stringValue\\":\\"https://example.com/createTracerProvider\\"}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"902e826c7a2ac84f\\",\\"parentSpanId\\":\\"6bd385f3cdac916f\\",\\"name\\":\\"traceTestReportArtifact test junit.xml\\",\\"kind\\":1,\\"startTimeUnixNano\\":1642826733000000000,\\"endTimeUnixNano\\":1642826733001000000,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"traceTestReportArtifact test junit.xml\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Case\\"}},{\\"key\\":\\"test.classname\\",\\"value\\":{\\"stringValue\\":\\"traceTestReportArtifact test junit.xml\\"}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.001}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"6bd385f3cdac916f\\",\\"parentSpanId\\":\\"aed87033c3371f0d\\",\\"name\\":\\"traceTestReportArtifact\\",\\"kind\\":1,\\"startTimeUnixNano\\":1642826733000000000,\\"endTimeUnixNano\\":1642826733178000000,\\"attributes\\":[{\\"key\\":\\"test.name\\",\\"value\\":{\\"stringValue\\":\\"traceTestReportArtifact\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Suite\\"}},{\\"key\\":\\"test.tests\\",\\"value\\":{\\"intValue\\":1}},{\\"key\\":\\"test.failures\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.errors\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.time\\",\\"value\\":{\\"doubleValue\\":0.178}},{\\"key\\":\\"test.skips\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.timestamp\\",\\"value\\":{\\"stringValue\\":\\"2022-01-22T04:45:33Z\\"}},{\\"key\\":\\"test.html_url\\",\\"value\\":{\\"stringValue\\":\\"https://example.com/traceTestReportArtifact\\"}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"aed87033c3371f0d\\",\\"parentSpanId\\":\\"24635a93ea56c064\\",\\"name\\":\\"jest tests\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740634759000000,\\"attributes\\":[{\\"key\\":\\"test.tests\\",\\"value\\":{\\"intValue\\":5}},{\\"key\\":\\"test.failures\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"test.errors\\",\\"value\\":{\\"intValue\\":0}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
{\\"resourceSpans\\":[{\\"resource\\":{\\"attributes\\":[{\\"key\\":\\"service.name\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"telemetry.sdk.language\\",\\"value\\":{\\"stringValue\\":\\"nodejs\\"}},{\\"key\\":\\"telemetry.sdk.name\\",\\"value\\":{\\"stringValue\\":\\"opentelemetry\\"}},{\\"key\\":\\"telemetry.sdk.version\\",\\"value\\":{\\"stringValue\\":\\"1.5.0\\"}},{\\"key\\":\\"service.instance.id\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.namespace\\",\\"value\\":{\\"stringValue\\":\\"test\\"}},{\\"key\\":\\"service.version\\",\\"value\\":{\\"stringValue\\":\\"1.0.0\\"}}],\\"droppedAttributesCount\\":0},\\"scopeSpans\\":[{\\"scope\\":{\\"name\\":\\"Trace Test Artifact\\"},\\"spans\\":[{\\"traceId\\":\\"4a647ac14a6066495c5578b8eb7ac9fa\\",\\"spanId\\":\\"24635a93ea56c064\\",\\"name\\":\\"Junit Test Runs\\",\\"kind\\":1,\\"startTimeUnixNano\\":1643740631000000000,\\"endTimeUnixNano\\":1643740634759000000,\\"attributes\\":[{\\"key\\":\\"test.source\\",\\"value\\":{\\"stringValue\\":\\"junit\\"}},{\\"key\\":\\"test.scope\\",\\"value\\":{\\"stringValue\\":\\"Run\\"}},{\\"key\\":\\"error\\",\\"value\\":{\\"boolValue\\":false}}],\\"droppedAttributesCount\\":0,\\"events\\":[],\\"droppedEventsCount\\":0,\\"status\\":{\\"code\\":1},\\"links\\":[],\\"droppedLinksCount\\":0}]}]}]}
"
`;
5 changes: 4 additions & 1 deletion src/runner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as github from "@actions/github";
import * as artifact from "@actions/artifact";
import * as core from "@actions/core";
import * as glob from "@actions/glob";
import { trace } from "@opentelemetry/api";
import { createTracerProvider } from "./trace-provider";
import { traceJunitArtifact } from "./trace-junit";
Expand Down Expand Up @@ -55,12 +56,14 @@ export async function run() {
return;
}
const startTime = new Date(step.started_at);

const globber = await glob.create(path, { matchDirectories: false });
core.info("Trace Test file");
if (type === "junit") {
await traceJunitArtifact({
trace,
tracer,
path,
filesGenerator: globber.globGenerator(),
startTime,
baseHtmlUrl: `${ghContext.serverUrl}/${ghContext.repo.owner}/${ghContext.repo.repo}`,
});
Expand Down
Loading