Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwitten committed Jun 26, 2020
1 parent d32bd6e commit 4655a49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/opentelemetry-exporter-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const collectorOptions = {
headers: {}, //an optional object containing custom headers to be sent with each request
};

const exporter = new MetricExporter(collectorOptions);
const exporter = new CollectorMetricExporter(collectorOptions);

// Register the exporter
const meter = new MeterProvider({
Expand Down Expand Up @@ -142,7 +142,7 @@ The CollectorMetricExporter in Node expects the URL to only be the hostname. It
```js
const grpc = require('grpc');
const { MeterProvider } = require('@opentelemetry/metrics');
const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector');
const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector');

const metadata = new grpc.Metadata();
metadata.set('k', 'v');
Expand All @@ -158,7 +158,7 @@ const collectorOptions = {
metadata // Optional metadata
};

const exporter = new MetricExporter(collectorOptions);
const exporter = new CollectorMetricExporter(collectorOptions);

// Register the exporter
const meter = new MeterProvider({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from '../../types';
import { sendWithBeacon, sendWithXhr } from './util';

const DEFAULT_COLLECTOR_URL = 'http://localhost:55678/v1/trace';
const DEFAULT_COLLECTOR_URL = 'http://localhost:55678/v1/metrics';

/**
* Collector Metric Exporter for Web
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-exporter-collector/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export function toCollectorType(
}
return opentelemetryProto.metrics.v1.MetricDescriptorType.MONOTONIC_DOUBLE;
} else {
// Other types not yet implemented
// @TODO: Implement other metric kinds
return opentelemetryProto.metrics.v1.MetricDescriptorType.INVALID_TYPE;
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ export function toCollectorMetric(
int64DataPoints = [points];
} else if (metric.descriptor.valueType === apiValueType.DOUBLE) {
doubleDataPoints = [points];
}
} // @TODO: Implement support for histogram/distribution points

return {
metricDescriptor: toCollectorMetricDescriptor(metric),
Expand Down

0 comments on commit 4655a49

Please sign in to comment.