Skip to content

Commit 6515ed8

Browse files
refactor(sdk-logs): replace ResourceAtrributes with Attributes (#5005)
Co-authored-by: Marc Pichler <[email protected]>
1 parent 0571e42 commit 6515ed8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

experimental/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ All notable changes to experimental packages in this project will be documented
2424
* refactor(exporter-prometheus): replace `MetricAttributes` and `MetricAttributeValues` with `Attributes` and `AttributeValues` [#4993](https://github.com/open-telemetry/opentelemetry-js/pull/4993)
2525

2626
* refactor(browser-detector): replace `ResourceAttributes` with `Attributes` [#5004](https://github.com/open-telemetry/opentelemetry-js/pull/5004)
27+
* refactor(sdk-logs): replace `ResourceAttributes` with `Attributes` [#5005](https://github.com/open-telemetry/opentelemetry-js/pull/5005) @david-luna
2728

2829
## 0.53.0
2930

experimental/packages/sdk-logs/test/common/export/BatchLogRecordProcessor.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import {
3232
import { BatchLogRecordProcessorBase } from '../../../src/export/BatchLogRecordProcessorBase';
3333
import { reconfigureLimits } from '../../../src/config';
3434
import { LoggerProviderSharedState } from '../../../src/internal/LoggerProviderSharedState';
35-
import { Resource, ResourceAttributes } from '@opentelemetry/resources';
35+
import { Attributes } from '@opentelemetry/api';
36+
import { Resource } from '@opentelemetry/resources';
3637

3738
class BatchLogRecordProcessor extends BatchLogRecordProcessorBase<BufferConfig> {
3839
onInit() {}
@@ -316,7 +317,7 @@ describe('BatchLogRecordProcessorBase', () => {
316317
const processor = new BatchLogRecordProcessor(exporter);
317318
const asyncResource = new Resource(
318319
{},
319-
new Promise<ResourceAttributes>(resolve => {
320+
new Promise<Attributes>(resolve => {
320321
setTimeout(() => resolve({ async: 'fromasync' }), 1);
321322
})
322323
);

experimental/packages/sdk-logs/test/common/export/SimpleLogRecordProcessor.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import {
2121
loggingErrorHandler,
2222
setGlobalErrorHandler,
2323
} from '@opentelemetry/core';
24-
import { Resource, ResourceAttributes } from '@opentelemetry/resources';
24+
import { Attributes } from '@opentelemetry/api';
25+
import { Resource } from '@opentelemetry/resources';
2526
import { Resource as Resource190 } from '@opentelemetry/resources_1.9.0';
2627

2728
import {
@@ -121,7 +122,7 @@ describe('SimpleLogRecordProcessor', () => {
121122
const exporter = new InMemoryLogRecordExporter();
122123
const asyncResource = new Resource(
123124
{},
124-
new Promise<ResourceAttributes>(resolve => {
125+
new Promise<Attributes>(resolve => {
125126
setTimeout(() => resolve({ async: 'fromasync' }), 1);
126127
})
127128
);
@@ -143,7 +144,7 @@ describe('SimpleLogRecordProcessor', () => {
143144
const testExporterWithDelay = new TestExporterWithDelay();
144145
const asyncResource = new Resource(
145146
{},
146-
new Promise<ResourceAttributes>(resolve => {
147+
new Promise<Attributes>(resolve => {
147148
setTimeout(() => resolve({ async: 'fromasync' }), 1);
148149
})
149150
);

0 commit comments

Comments
 (0)