You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Issue #, if available:*
*Description of changes:*
Migrate Python change
aws-observability/aws-otel-python-instrumentation#420
to JS.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
`Invalid configuration for OTLPAwsLogExporter, please configure the environment variable OTEL_EXPORTER_OTLP_LOGS_HEADERS to have values for ${AWS_OTLP_LOGS_GROUP_HEADER} and ${AWS_OTLP_LOGS_STREAM_HEADER}. Falling back to OTLPProtoLogExporter`
575
+
);
576
+
}
578
577
}
578
+
579
+
if(!logExporter){
580
+
logExporter=newOTLPProtoLogExporter();
581
+
}
582
+
exporters.push(logExporter);
579
583
break;
584
+
}
580
585
caseundefined:
581
586
case'':
582
587
exporters.push(newOTLPProtoLogExporter());
583
588
break;
584
-
default:
589
+
default:{
585
590
diag.warn(`Unsupported OTLP logs protocol: "${protocol}". Using http/protobuf.`);
`Invalid configuration for OTLPAwsLogExporter, please configure the environment variable OTEL_EXPORTER_OTLP_LOGS_HEADERS to have values for ${AWS_OTLP_LOGS_GROUP_HEADER} and ${AWS_OTLP_LOGS_STREAM_HEADER}. Falling back to OTLPProtoLogExporter`
601
+
);
602
+
}
603
+
}
604
+
605
+
if(!logExporter){
606
+
logExporter=newOTLPProtoLogExporter();
599
607
}
608
+
exporters.push(logExporter);
609
+
}
600
610
}
601
611
}elseif(exporter==='console'){
602
612
exporters.push(newConsoleLogRecordExporter());
@@ -967,7 +977,6 @@ export function validateAndFetchLogsHeader(): OtlpLogHeaderSetting {
967
977
letlogGroup: string|undefined=undefined;
968
978
letlogStream: string|undefined=undefined;
969
979
letnamespace: string|undefined=undefined;
970
-
letfilteredLogHeadersCount: number=0;
971
980
972
981
for(constpairoflogHeaders.split(',')){
973
982
constsplitIndex=pair.indexOf('=');
@@ -977,23 +986,15 @@ export function validateAndFetchLogsHeader(): OtlpLogHeaderSetting {
0 commit comments