Skip to content

Commit 3aa9ff3

Browse files
committed
chore: add changes to README and revert other changes
1 parent 8db1693 commit 3aa9ff3

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

packages/opentelemetry-exporter-collector-grpc/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-g
2828

2929
const collectorOptions = {
3030
// url is optional and can be omitted - default is grpc://localhost:4317
31-
url: '<collector-hostname>:<port>',
31+
url: 'grpc://<collector-hostname>:<port>',
3232
};
3333

3434
const provider = new BasicTracerProvider();
@@ -52,7 +52,7 @@ const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-g
5252

5353
const collectorOptions = {
5454
// url is optional and can be omitted - default is grpc://localhost:4317
55-
url: '<collector-hostname>:<port>',
55+
url: 'grpc://<collector-hostname>:<port>',
5656
credentials: grpc.credentials.createSsl(),
5757
};
5858

@@ -92,7 +92,7 @@ metadata.set('k', 'v');
9292

9393
const collectorOptions = {
9494
// url is optional and can be omitted - default is grpc://localhost:4317
95-
url: '<collector-hostname>:<port>',
95+
url: 'grpc://<collector-hostname>:<port>',
9696
metadata, // // an optional grpc.Metadata object to be sent with each request
9797
};
9898

@@ -117,7 +117,7 @@ const { MeterProvider } = require('@opentelemetry/metrics');
117117
const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-grpc');
118118
const collectorOptions = {
119119
// url is optional and can be omitted - default is grpc://localhost:4317
120-
url: '<collector-hostname>:<port>',
120+
url: 'grpc://<collector-hostname>:<port>',
121121
};
122122
const exporter = new CollectorMetricExporter(collectorOptions);
123123

packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { CollectorExporterNodeBase } from './CollectorExporterNodeBase';
2424
import { getEnv } from '@opentelemetry/core';
2525
import { validateAndNormalizeUrl } from './util';
2626

27-
const DEFAULT_COLLECTOR_URL = 'grpc://localhost:4317';
27+
const DEFAULT_COLLECTOR_URL = 'localhost:4317';
2828

2929
/**
3030
* Collector Metric Exporter for Node

packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { CollectorExporterConfigNode, ServiceClientType } from './types';
2424
import { getEnv } from '@opentelemetry/core';
2525
import { validateAndNormalizeUrl } from './util';
2626

27-
const DEFAULT_COLLECTOR_URL = 'grpc://localhost:4317';
27+
const DEFAULT_COLLECTOR_URL = 'localhost:4317';
2828

2929
/**
3030
* Collector Trace Exporter for Node

packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ describe('CollectorMetricExporter - node (getDefaultUrl)', () => {
242242
it('should default to localhost', done => {
243243
const collectorExporter = new CollectorMetricExporter({});
244244
setTimeout(() => {
245-
assert.strictEqual(collectorExporter['url'], 'grpc://localhost:4317');
245+
assert.strictEqual(collectorExporter['url'], 'localhost:4317');
246246
done();
247247
});
248248
});

packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ describe('CollectorTraceExporter - node (getDefaultUrl)', () => {
204204
it('should default to localhost', done => {
205205
const collectorExporter = new CollectorTraceExporter({});
206206
setTimeout(() => {
207-
assert.strictEqual(collectorExporter['url'], 'grpc://localhost:4317');
207+
assert.strictEqual(collectorExporter['url'], 'localhost:4317');
208208
done();
209209
});
210210
});

0 commit comments

Comments
 (0)