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

fix(instrumentation-http): use semantic convention metric descriptions #3710

Merged
merged 5 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :bug: (Bug Fix)

* fix(instrumentation-http): fixed description for http.server.duration metric [#3710](https://github.com/open-telemetry/opentelemetry-js/pull/3710)

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
this._httpServerDurationHistogram = this.meter.createHistogram(
'http.server.duration',
{
description: 'measures the duration of the inbound HTTP requests',
description: 'Measures the duration of inbound HTTP requests.',
unit: 'ms',
valueType: ValueType.DOUBLE,
}
);
this._httpClientDurationHistogram = this.meter.createHistogram(
'http.client.duration',
{
description: 'measures the duration of the outbound HTTP requests',
description: 'Measures the duration of outbound HTTP requests.',
unit: 'ms',
valueType: ValueType.DOUBLE,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('metrics', () => {
assert.strictEqual(metrics[0].dataPointType, DataPointType.HISTOGRAM);
assert.strictEqual(
metrics[0].descriptor.description,
'measures the duration of the inbound HTTP requests'
'Measures the duration of inbound HTTP requests.'
);
assert.strictEqual(metrics[0].descriptor.name, 'http.server.duration');
assert.strictEqual(metrics[0].descriptor.unit, 'ms');
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('metrics', () => {
assert.strictEqual(metrics[1].dataPointType, DataPointType.HISTOGRAM);
assert.strictEqual(
metrics[1].descriptor.description,
'measures the duration of the outbound HTTP requests'
'Measures the duration of outbound HTTP requests.'
);
assert.strictEqual(metrics[1].descriptor.name, 'http.client.duration');
assert.strictEqual(metrics[1].descriptor.unit, 'ms');
Expand Down