Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
### :boom: Breaking Changes

* feat(configuration)!: rename OTEL_EXPERIMENTAL_CONFIG_FILE to OTEL_CONFIG_FILE [#6486](https://github.com/open-telemetry/opentelemetry-js/pull/6486) @maryliag
* refactor!(otlp-grpc-exporter-base): remove `headers` from gRPC exporter config type, passing headers now results in a compile-time error instead of being silently ignored [#6487](https://github.com/open-telemetry/opentelemetry-js/pull/6487)

### :rocket: Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { OTLPGRPCExporterConfigNode } from '../types';
import { diag } from '@opentelemetry/api';
import type { OtlpGrpcConfiguration } from './otlp-grpc-configuration';
import {
getOtlpGrpcDefaultConfiguration,
Expand All @@ -21,10 +20,6 @@ export function convertLegacyOtlpGrpcOptions(
config: OTLPGRPCExporterConfigNode,
signalIdentifier: string
): OtlpGrpcConfiguration {
if (config.headers) {
diag.warn('Headers cannot be set when using grpc');
}

// keep credentials locally in case user updates the reference on the config object
const userProvidedCredentials = config.credentials;
return mergeOtlpGrpcConfigurationWithDefaults(
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/otlp-grpc-exporter-base/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import type { ChannelCredentials, Metadata } from '@grpc/grpc-js';

import type {
CompressionAlgorithm,
OTLPExporterConfigBase,
Expand All @@ -13,7 +12,8 @@ import type {
/**
* OTLP Exporter Config for Node
*/
export interface OTLPGRPCExporterConfigNode extends OTLPExporterConfigBase {
export interface OTLPGRPCExporterConfigNode
extends Omit<OTLPExporterConfigBase, 'headers'> {
credentials?: ChannelCredentials;
metadata?: Metadata;
compression?: CompressionAlgorithm;
Expand Down
Loading