Skip to content

Commit

Permalink
refactor(sdk-logs): replace ResourceAtrributes with Attributes (#5005)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
david-luna and pichlermarc authored Sep 20, 2024
1 parent 0571e42 commit 6515ed8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ All notable changes to experimental packages in this project will be documented
* refactor(exporter-prometheus): replace `MetricAttributes` and `MetricAttributeValues` with `Attributes` and `AttributeValues` [#4993](https://github.com/open-telemetry/opentelemetry-js/pull/4993)

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

## 0.53.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import {
import { BatchLogRecordProcessorBase } from '../../../src/export/BatchLogRecordProcessorBase';
import { reconfigureLimits } from '../../../src/config';
import { LoggerProviderSharedState } from '../../../src/internal/LoggerProviderSharedState';
import { Resource, ResourceAttributes } from '@opentelemetry/resources';
import { Attributes } from '@opentelemetry/api';
import { Resource } from '@opentelemetry/resources';

class BatchLogRecordProcessor extends BatchLogRecordProcessorBase<BufferConfig> {
onInit() {}
Expand Down Expand Up @@ -316,7 +317,7 @@ describe('BatchLogRecordProcessorBase', () => {
const processor = new BatchLogRecordProcessor(exporter);
const asyncResource = new Resource(
{},
new Promise<ResourceAttributes>(resolve => {
new Promise<Attributes>(resolve => {
setTimeout(() => resolve({ async: 'fromasync' }), 1);
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
loggingErrorHandler,
setGlobalErrorHandler,
} from '@opentelemetry/core';
import { Resource, ResourceAttributes } from '@opentelemetry/resources';
import { Attributes } from '@opentelemetry/api';
import { Resource } from '@opentelemetry/resources';
import { Resource as Resource190 } from '@opentelemetry/resources_1.9.0';

import {
Expand Down Expand Up @@ -121,7 +122,7 @@ describe('SimpleLogRecordProcessor', () => {
const exporter = new InMemoryLogRecordExporter();
const asyncResource = new Resource(
{},
new Promise<ResourceAttributes>(resolve => {
new Promise<Attributes>(resolve => {
setTimeout(() => resolve({ async: 'fromasync' }), 1);
})
);
Expand All @@ -143,7 +144,7 @@ describe('SimpleLogRecordProcessor', () => {
const testExporterWithDelay = new TestExporterWithDelay();
const asyncResource = new Resource(
{},
new Promise<ResourceAttributes>(resolve => {
new Promise<Attributes>(resolve => {
setTimeout(() => resolve({ async: 'fromasync' }), 1);
})
);
Expand Down

0 comments on commit 6515ed8

Please sign in to comment.