Skip to content

Commit f1ef596

Browse files
authored
fix(instrumentation-http): iterating through the OTEL_SEMCONV_STABILITY_OPT_IN content instead of the entry indices (open-telemetry#5137)
1 parent 8483b68 commit f1ef596

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

experimental/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ All notable changes to experimental packages in this project will be documented
5050

5151
### :bug: (Bug Fix)
5252

53+
* fix(instrumentation-http): Fix the `OTEL_SEMCONV_STABILITY_OPT_IN` variable check. Using `of` instead of `in` [#5137](https://github.com/open-telemetry/opentelemetry-js/pull/5137)
54+
5355
* fix(instrumentation-http): drop url.parse in favor of URL constructor [#5091](https://github.com/open-telemetry/opentelemetry-js/pull/5091) @pichlermarc
5456
* fixes a bug where using cyrillic characters in a client request string URL would throw an exception, whereas an un-instrumented client would accept the same input without throwing an exception
5557

experimental/packages/opentelemetry-instrumentation-http/src/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class HttpInstrumentation extends InstrumentationBase<HttpInstrumentation
109109
super('@opentelemetry/instrumentation-http', VERSION, config);
110110
this._headerCapture = this._createHeaderCapture();
111111

112-
for (const entry in getEnv().OTEL_SEMCONV_STABILITY_OPT_IN) {
112+
for (const entry of getEnv().OTEL_SEMCONV_STABILITY_OPT_IN) {
113113
if (entry.toLowerCase() === 'http/dup') {
114114
// http/dup takes highest precedence. If it is found, there is no need to read the rest of the list
115115
this._semconvStability = SemconvStability.DUPLICATE;

0 commit comments

Comments
 (0)