Skip to content

Commit

Permalink
feat(trace): support http as a trigger for isHttpEndpoint
Browse files Browse the repository at this point in the history
Extend isHttpEndpoint to allow `http` in addition to `https`. This is
particularly useful when the OTEL Collector resides within the same VPC as
self-hosted GitHub runners or ARC runners.

As such, traces can be sent directly to the OTEL Collector without exposing it
to the public internet. This also avoids unnecessary network overhead as the traces
do not need to be sent to the public internet to then be sent back to the internal
network.
  • Loading branch information
ardelato committed Dec 17, 2024
1 parent c71f50b commit b68903a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119384,7 +119384,7 @@ function stringToHeader(value) {
}
exports.stringToHeader = stringToHeader;
function isHttpEndpoint(endpoint) {
return endpoint.startsWith("https://");
return endpoint.startsWith("https://") || endpoint.startsWith("http://");
}
function createTracerProvider(otlpEndpoint, otlpHeaders, workflowRunJobs, otelServiceName) {
const serviceName = otelServiceName ||
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tracing/trace.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/tracing/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function stringToHeader(value: string): StringDict {
}

function isHttpEndpoint(endpoint: string): boolean {
return endpoint.startsWith("https://");
return endpoint.startsWith("https://") || endpoint.startsWith("http://");
}

export function createTracerProvider(
Expand Down

0 comments on commit b68903a

Please sign in to comment.