Skip to content

Commit

Permalink
fix(mysql): metrics - align metrics description and unit to semconv (#…
Browse files Browse the repository at this point in the history
…1480)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
  • Loading branch information
haddasbronfman and pichlermarc committed May 1, 2023
1 parent 07c79ba commit 9fbd9e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export class MySQLInstrumentation extends InstrumentationBase<
'db.client.connections.usage', //TODO:: use semantic convention
{
description:
'The number of connections that are currently in the state referenced by the attribute "state".',
unit: '{connections}',
'The number of connections that are currently in state described by the state attribute.',
unit: '{connection}',
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ describe('mysql@2.x-Metrics', () => {

assert.strictEqual(
metrics[0].descriptor.description,
'The number of connections that are currently in the state referenced by the attribute "state".'
'The number of connections that are currently in state described by the state attribute.'
);
assert.strictEqual(metrics[0].descriptor.unit, '{connections}');
assert.strictEqual(metrics[0].descriptor.unit, '{connection}');
assert.strictEqual(
metrics[0].descriptor.name,
'db.client.connections.usage'
Expand Down Expand Up @@ -248,9 +248,9 @@ describe('mysql@2.x-Metrics', () => {
assert.strictEqual(metrics[0].dataPointType, DataPointType.SUM);
assert.strictEqual(
metrics[0].descriptor.description,
'The number of connections that are currently in the state referenced by the attribute "state".'
'The number of connections that are currently in state described by the state attribute.'
);
assert.strictEqual(metrics[0].descriptor.unit, '{connections}');
assert.strictEqual(metrics[0].descriptor.unit, '{connection}');
assert.strictEqual(
metrics[0].descriptor.name,
'db.client.connections.usage'
Expand Down Expand Up @@ -325,9 +325,9 @@ describe('mysql@2.x-Metrics', () => {

assert.strictEqual(
metrics[0].descriptor.description,
'The number of connections that are currently in the state referenced by the attribute "state".'
'The number of connections that are currently in state described by the state attribute.'
);
assert.strictEqual(metrics[0].descriptor.unit, '{connections}');
assert.strictEqual(metrics[0].descriptor.unit, '{connection}');
assert.strictEqual(
metrics[0].descriptor.name,
'db.client.connections.usage'
Expand Down

0 comments on commit 9fbd9e8

Please sign in to comment.