Skip to content

Commit 829ac83

Browse files
authored
OpenTelemetry Exporter arch board feedback (Azure#13810)
* OpenTelemetry Exporter arch board feedback * Lint * Api extractor update
1 parent a563702 commit 829ac83

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

sdk/monitor/monitor-opentelemetry-exporter/review/monitor-opentelemetry-exporter.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import { SpanExporter } from '@opentelemetry/tracing';
1111
// @public (undocumented)
1212
export interface AzureExporterConfig {
1313
// (undocumented)
14-
connectionString?: string;
14+
apiVersion?: ServiceApiVersion;
1515
// (undocumented)
16-
serviceApiVersion?: ServiceApiVersion;
16+
connectionString?: string;
1717
}
1818

1919
// @public (undocumented)
2020
export class AzureMonitorTraceExporter implements SpanExporter {
21-
constructor(options?: Partial<AzureExporterConfig>);
21+
constructor(options?: AzureExporterConfig);
2222
// (undocumented)
2323
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>;
2424
// (undocumented)

sdk/monitor/monitor-opentelemetry-exporter/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface AzureExporterConfig {
1515
// Setup String
1616
connectionString?: string;
1717
// Azure service API version
18-
serviceApiVersion?: ServiceApiVersion;
18+
apiVersion?: ServiceApiVersion;
1919
}
2020

2121
export interface AzureExporterInternalConfig {
@@ -32,13 +32,13 @@ export interface AzureExporterInternalConfig {
3232

3333
endpointUrl: string;
3434

35-
serviceApiVersion: ServiceApiVersion;
35+
apiVersion: ServiceApiVersion;
3636
}
3737

3838
export const DEFAULT_EXPORTER_CONFIG: AzureExporterInternalConfig = {
3939
instrumentationKey: "",
4040
endpointUrl: DEFAULT_BREEZE_ENDPOINT,
4141
batchSendRetryIntervalMs: DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS,
4242
maxConsecutiveFailuresBeforeWarning: DEFAULT_MAX_CONSECUTIVE_FAILURES_BEFORE_WARNING,
43-
serviceApiVersion: DEFAULT_BREEZE_API_VERSION
43+
apiVersion: DEFAULT_BREEZE_API_VERSION
4444
};

sdk/monitor/monitor-opentelemetry-exporter/src/export/trace.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ export class AzureMonitorTraceExporter implements SpanExporter {
2929

3030
private readonly _options: AzureExporterInternalConfig;
3131

32-
constructor(options: Partial<AzureExporterConfig> = {}) {
32+
constructor(options: AzureExporterConfig = {}) {
3333
const connectionString = options.connectionString || process.env[ENV_CONNECTION_STRING];
3434
this._logger = new ConsoleLogger(LogLevel.ERROR);
3535
this._options = {
3636
...DEFAULT_EXPORTER_CONFIG
3737
};
38-
this._options.serviceApiVersion = options.serviceApiVersion ?? this._options.serviceApiVersion;
38+
this._options.apiVersion = options.apiVersion ?? this._options.apiVersion;
3939

4040
if (connectionString) {
4141
const parsedConnectionString = ConnectionStringParser.parse(connectionString, this._logger);

sdk/monitor/monitor-opentelemetry-exporter/src/platform/nodejs/httpSender.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class HttpSender implements Sender {
1717
private readonly _appInsightsClient: ApplicationInsightsClient;
1818
private _appInsightsClientOptions: ApplicationInsightsClientOptionalParams;
1919

20-
constructor(private _exporterOptions: Partial<AzureExporterInternalConfig>) {
20+
constructor(private _exporterOptions: AzureExporterInternalConfig) {
2121
this._logger = this._exporterOptions.logger || new ConsoleLogger(LogLevel.ERROR);
2222
// Build endpoint using provided configuration or default values
2323
this._appInsightsClientOptions = {

0 commit comments

Comments
 (0)