Skip to content

Commit

Permalink
Update packages/opentelemetry-exporter-collector-grpc/src/util.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Naseem <naseemkullah@gmail.com>
  • Loading branch information
lizthegrey and naseemkullah committed Jul 12, 2021
1 parent e65d5e6 commit 842165b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/opentelemetry-exporter-collector-grpc/src/util.ts
Expand Up @@ -108,7 +108,8 @@ export function send<ExportItem, ServiceRequest>(
}

export function validateAndNormalizeUrl(url: string): string {
if (!url.match(/^([\w]{1,8}):\/\//)) {
const hasProtocol = url.match(/^([\w]{1,8}):\/\//;
if (!hasProtocol) {
url = `https://${url}`;
}
const target = new URL(url);
Expand Down

0 comments on commit 842165b

Please sign in to comment.