Skip to content

Commit 14bdf0b

Browse files
authored
Merge branch 'main' into feat/otlp-exporter--base-fetch-transport
2 parents 1872256 + 48538b4 commit 14bdf0b

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55

66
For API changes, see the [API CHANGELOG](api/CHANGELOG.md).
77
For experimental package changes, see the [experimental CHANGELOG](experimental/CHANGELOG.md).
8-
For semantic convention package changes, see the [semconv CHANGELOG](packages/semantic-conventions/CHANGELOG.md).
8+
For semantic convention package changes, see the [semconv CHANGELOG](semantic-conventions/CHANGELOG.md).
99
For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2.x.md).
1010

1111
## Unreleased

doc/contributing/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This section refers to `"dependencies"` and `"devDependencies"` entries in `pack
1111
**Example:** `^1.2.3` might inadvertently lead to version `1.2.6` which includes unintended breaking changes).
1212

1313
> [!NOTE]
14-
> As this approach might leave our project with outdated tooling, we adopt `renovate-bot`. This automated dependency update tool proactively opens pull requests upon the release of new patch/minor/major versions. The complete configuration for renovate-bot can be found in [renovate.json](../renovate.json) file.
14+
> As this approach might leave our project with outdated tooling, we adopt `renovate-bot`. This automated dependency update tool proactively opens pull requests upon the release of new patch/minor/major versions. The complete configuration for renovate-bot can be found in [renovate.json](../../renovate.json) file.
1515
1616
## @opentelemetry/* dependencies
1717

experimental/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
1818

1919
### :house: Internal
2020

21+
* chore(sdk-logs): refactored imports [#5801](https://github.com/open-telemetry/opentelemetry-js/pull/5801) @svetlanabrennan
22+
2123
## 0.203.0
2224

2325
### :boom: Breaking Changes

experimental/packages/sdk-logs/src/LogRecordImpl.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { AttributeValue, diag } from '@opentelemetry/api';
1817
import type * as logsAPI from '@opentelemetry/api-logs';
1918
import * as api from '@opentelemetry/api';
2019
import {
@@ -26,7 +25,6 @@ import type { Resource } from '@opentelemetry/resources';
2625

2726
import type { ReadableLogRecord } from './export/ReadableLogRecord';
2827
import type { LogRecordLimits } from './types';
29-
import { AnyValue, LogAttributes, LogBody } from '@opentelemetry/api-logs';
3028
import { LoggerProviderSharedState } from './internal/LoggerProviderSharedState';
3129

3230
export class LogRecordImpl implements ReadableLogRecord {
@@ -38,7 +36,7 @@ export class LogRecordImpl implements ReadableLogRecord {
3836
readonly attributes: logsAPI.LogAttributes = {};
3937
private _severityText?: string;
4038
private _severityNumber?: logsAPI.SeverityNumber;
41-
private _body?: LogBody;
39+
private _body?: logsAPI.LogBody;
4240
private _eventName?: string;
4341
private totalAttributesCount: number = 0;
4442

@@ -65,13 +63,13 @@ export class LogRecordImpl implements ReadableLogRecord {
6563
return this._severityNumber;
6664
}
6765

68-
set body(body: LogBody | undefined) {
66+
set body(body: logsAPI.LogBody | undefined) {
6967
if (this._isLogRecordReadonly()) {
7068
return;
7169
}
7270
this._body = body;
7371
}
74-
get body(): LogBody | undefined {
72+
get body(): logsAPI.LogBody | undefined {
7573
return this._body;
7674
}
7775

@@ -125,7 +123,7 @@ export class LogRecordImpl implements ReadableLogRecord {
125123
this.setAttributes(attributes);
126124
}
127125

128-
public setAttribute(key: string, value?: AnyValue) {
126+
public setAttribute(key: string, value?: logsAPI.AnyValue) {
129127
if (this._isLogRecordReadonly()) {
130128
return this;
131129
}
@@ -167,14 +165,14 @@ export class LogRecordImpl implements ReadableLogRecord {
167165
return this;
168166
}
169167

170-
public setAttributes(attributes: LogAttributes) {
168+
public setAttributes(attributes: logsAPI.LogAttributes) {
171169
for (const [k, v] of Object.entries(attributes)) {
172170
this.setAttribute(k, v);
173171
}
174172
return this;
175173
}
176174

177-
public setBody(body: LogBody) {
175+
public setBody(body: logsAPI.LogBody) {
178176
this.body = body;
179177
return this;
180178
}
@@ -203,7 +201,7 @@ export class LogRecordImpl implements ReadableLogRecord {
203201
this._isReadonly = true;
204202
}
205203

206-
private _truncateToSize(value: AttributeValue): AttributeValue {
204+
private _truncateToSize(value: api.AttributeValue): api.AttributeValue {
207205
const limit = this._logRecordLimits.attributeValueLengthLimit;
208206
// Check limit
209207
if (limit <= 0) {
@@ -237,7 +235,7 @@ export class LogRecordImpl implements ReadableLogRecord {
237235

238236
private _isLogRecordReadonly(): boolean {
239237
if (this._isReadonly) {
240-
diag.warn('Can not execute the operation on emitted log record');
238+
api.diag.warn('Can not execute the operation on emitted log record');
241239
}
242240
return this._isReadonly;
243241
}

experimental/packages/sdk-logs/src/export/BatchLogRecordProcessorBase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ExportResult, getNumberFromEnv } from '@opentelemetry/core';
1817
import { diag } from '@opentelemetry/api';
1918
import {
19+
ExportResult,
2020
ExportResultCode,
21+
getNumberFromEnv,
2122
globalErrorHandler,
2223
unrefTimer,
2324
BindOnceFuture,

experimental/packages/sdk-logs/src/export/ConsoleLogRecordExporter.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ExportResult, hrTimeToMicroseconds } from '@opentelemetry/core';
18-
import { ExportResultCode } from '@opentelemetry/core';
17+
import {
18+
ExportResultCode,
19+
ExportResult,
20+
hrTimeToMicroseconds,
21+
} from '@opentelemetry/core';
1922

2023
import type { ReadableLogRecord } from './ReadableLogRecord';
2124
import type { LogRecordExporter } from './LogRecordExporter';

0 commit comments

Comments
 (0)