Skip to content

Commit c2c9399

Browse files
authored
refactor(exporter-prometheus): update semconv usage to ATTR_ exports (#5675)
1 parent b50f088 commit c2c9399

File tree

1 file changed

+8
-8
lines changed
  • experimental/packages/opentelemetry-exporter-prometheus/test

1 file changed

+8
-8
lines changed

experimental/packages/opentelemetry-exporter-prometheus/test/util.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import * as sinon from 'sinon';
1818
import { defaultResource } from '@opentelemetry/resources';
1919
import {
20-
SEMRESATTRS_SERVICE_NAME,
21-
SEMRESATTRS_TELEMETRY_SDK_LANGUAGE,
22-
SEMRESATTRS_TELEMETRY_SDK_NAME,
23-
SEMRESATTRS_TELEMETRY_SDK_VERSION,
20+
ATTR_SERVICE_NAME,
21+
ATTR_TELEMETRY_SDK_LANGUAGE,
22+
ATTR_TELEMETRY_SDK_NAME,
23+
ATTR_TELEMETRY_SDK_VERSION,
2424
} from '@opentelemetry/semantic-conventions';
2525

2626
export const mockedHrTimeMs = 1586347902211;
@@ -30,18 +30,18 @@ export function mockHrTime() {
3030
}
3131

3232
export const serviceName = defaultResource()
33-
.attributes[SEMRESATTRS_SERVICE_NAME]?.toString()
33+
.attributes[ATTR_SERVICE_NAME]?.toString()
3434
.replace(/\\/g, '\\\\')
3535
.replace(/\n/g, '\\n');
3636
export const sdkLanguage = defaultResource()
37-
.attributes[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]?.toString()
37+
.attributes[ATTR_TELEMETRY_SDK_LANGUAGE]?.toString()
3838
.replace(/\\/g, '\\\\')
3939
.replace(/\n/g, '\\n');
4040
export const sdkName = defaultResource()
41-
.attributes[SEMRESATTRS_TELEMETRY_SDK_NAME]?.toString()
41+
.attributes[ATTR_TELEMETRY_SDK_NAME]?.toString()
4242
.replace(/\\/g, '\\\\')
4343
.replace(/\n/g, '\\n');
4444
export const sdkVersion = defaultResource()
45-
.attributes[SEMRESATTRS_TELEMETRY_SDK_VERSION]?.toString()
45+
.attributes[ATTR_TELEMETRY_SDK_VERSION]?.toString()
4646
.replace(/\\/g, '\\\\')
4747
.replace(/\n/g, '\\n');

0 commit comments

Comments
 (0)