Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(instrumentation-http)!: remove deprecated ignore options #5085

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Oct 22, 2024

Which problem is this PR solving?

The ignoreIncomingPaths and ignoreOutgoingUrls have both been deprecated for 2.5+ years (see #2704). I'm removing them now because they partially cause #5060. They are not the only place where we use url.parse() though, so I'll follow up with a bugfix PR that will replace the ones that are left over (one down, three to go)

Prepares for additional changes to address #5060

Short description of the changes

  • ignoreIncomingPaths has been removed, use the more versatile ignoreIncomingRequestHook instead.
  • ignoreOutgoingUrls has been removed, use the more versatile ignoreOutgoingRequestHook instead.
  • isIgnored utility function was intended for internal use and has been removed without replacement.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Remaining pre-existing tests

@pichlermarc pichlermarc requested a review from a team as a code owner October 22, 2024 15:34
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.26%. Comparing base (5e17361) to head (80a5893).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5085      +/-   ##
==========================================
- Coverage   93.27%   93.26%   -0.02%     
==========================================
  Files         317      317              
  Lines        8195     8195              
  Branches     1641     1641              
==========================================
- Hits         7644     7643       -1     
- Misses        551      552       +1     

see 1 file with indirect coverage changes

@pichlermarc pichlermarc added this pull request to the merge queue Oct 23, 2024
Merged via the queue into open-telemetry:main with commit 50d59ca Oct 23, 2024
21 checks passed
@pichlermarc pichlermarc deleted the feat/remove-deprecated-options branch October 23, 2024 11:27
Annosha pushed a commit to Annosha/opentelemetry-js that referenced this pull request Nov 2, 2024
newkdr added a commit to newkdr/vscode-gitlens that referenced this pull request Dec 10, 2024
… 0.54.2 (#7)

![snyk-top-banner](https://redirect.github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)


<h3>Snyk has created this PR to upgrade
@opentelemetry/exporter-trace-otlp-http from 0.54.0 to 0.54.2.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.

<hr/>


- The recommended version is **2 versions** ahead of your current
version.

- The recommended version was released on **a month ago**.



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
<summary>Package name:
<b>@opentelemetry/exporter-trace-otlp-http</b></summary>
    <ul>
      <li>
<b>0.54.2</b> - <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.54.2">2024-11-07</a></br><h2>0.54.2</h2>
<h3>🐛 (Bug Fix)</h3>
<ul>
<li>fix(instrumentation): Fix wrapping ESM files with absolute path <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5094"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5094/hovercard">#5094</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/serkan-ozal/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/serkan-ozal">@ serkan-ozal</a></li>
</ul>
      </li>
      <li>
<b>0.54.1</b> - <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.54.1">2024-11-05</a></br><h2>0.54.1</h2>
<h3>🐛 (Bug Fix)</h3>
<ul>
<li>fix(instrumentation-http): skip malformed forwarded headers. <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/issues/5095"
data-hovercard-type="issue"
data-hovercard-url="/open-telemetry/opentelemetry-js/issues/5095/hovercard">#5095</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pmlanger/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pmlanger">@ pmlanger</a></li>
</ul>
      </li>
      <li>
<b>0.54.0</b> - <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.54.0">2024-10-23</a></br><h2>0.54.0</h2>
<h3>💥 Breaking Change</h3>
<ul>
<li>feat(exporter-<em>-otlp-</em>)!: rewrite exporter config logic for
testability <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4971"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4971/hovercard">#4971</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a>
<ul>
<li>(user-facing) <code>getDefaultUrl</code> was intended for internal
use has been removed from all exporters</li>
<li>(user-facing) <code>getUrlFromConfig</code> was intended for
internal use and has been removed from all exporters</li>
<li>(user-facing) <code>hostname</code> was intended for internal use
and has been removed from all exporters</li>
<li>(user-facing) <code>url</code> was intended for internal use and has
been removed from all exporters</li>
<li>(user-facing) <code>timeoutMillis</code> was intended for internal
use and has been removed from all exporters</li>
<li>(user-facing) <code>onInit</code> was intended for internal use and
has been removed from all exporters</li>
<li>(user-facing) OTLP exporter config <code>headers</code> type changed
from <code>Partial&lt;Record&lt;string, unknown&gt;&gt;</code> to
<code>Record&lt;string, string&gt;</code></li>
</ul>
</li>
<li>feat(otlp-exporter-base)!: do not export functions that are intended
for internal use <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4971"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4971/hovercard">#4971</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a>
<ul>
<li>Drops the following functions and types that were intended for
internal use from the package exports:
<ul>
<li><code>parseHeaders</code></li>
<li><code>appendResourcePathToUrl</code></li>
<li><code>appendResourcePathToUrlIfNeeded</code></li>
<li><code>configureExporterTimeout</code></li>
<li><code>invalidTimeout</code></li>
</ul>
</li>
</ul>
</li>
<li>feat(instrumentation-http)!: remove long deprecated options <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5085"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5085/hovercard">#5085</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a>
<ul>
<li><code>ignoreIncomingPaths</code> has been removed, use the more
versatile <code>ignoreIncomingRequestHook</code> instead.</li>
<li><code>ignoreOutgoingUrls</code> has been removed, use the more
versatile <code>ignoreOutgoingRequestHook</code> instead.</li>
<li><code>isIgnored</code> utility function was intended for internal
use and has been removed without replacement.</li>
</ul>
</li>
</ul>
<h3>🚀 (Enhancement)</h3>
<ul>
<li>feat(api-logs): Add delegating no-op logger provider <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4861"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4861/hovercard">#4861</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/hectorhdzg/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/hectorhdzg">@ hectorhdzg</a></li>
<li>feat(instrumentation-http): Add support for <a
href="https://redirect.github.com/open-telemetry/semantic-conventions/releases/tag/v1.27.0">Semantic
Conventions 1.27+</a> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4940"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4940/hovercard">#4940</a>
<a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4978"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4978/hovercard">#4978</a>
<a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5026"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5026/hovercard">#5026</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/dyladan/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/dyladan">@ dyladan</a>
<ul>
<li>Applies to client and server spans and metrics</li>
<li>Generate spans and metrics compliant with Semantic Conventions 1.27+
when <code>OTEL_SEMCONV_STABILITY_OPT_IN</code> contains
<code>http</code> or <code>http/dup</code></li>
<li>Generate spans and metrics backwards compatible with previous
attributes when <code>OTEL_SEMCONV_STABILITY_OPT_IN</code> contains
<code>http/dup</code> or DOES NOT contain <code>http</code></li>
</ul>
</li>
</ul>
<h3>🐛 (Bug Fix)</h3>
<ul>
<li>fix(sampler-jaeger-remote): fixes an issue where package could emit
unhandled promise rejections <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/Just-Sieb/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/Just-Sieb">@ Just-Sieb</a></li>
<li>fix(otlp-grpc-exporter-base): default compression to
<code>'none'</code> if env vars
<code>OTEL_EXPORTER_OTLP_TRACES_COMPRESSION</code> and
<code>OTEL_EXPORTER_OTLP_COMPRESSION</code> are falsy <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/sjvans/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/sjvans">@ sjvans</a></li>
<li>fix(sdk-events): remove devDependencies to old <code>@
opentelemetry/api-logs@0.52.0</code>, <code>@
opentelemetry/api-events@0.52.0</code> packages <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5013"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5013/hovercard">#5013</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a></li>
<li>fix(sdk-logs): remove devDependencies to old <code>@
opentelemetry/api-logs@0.52.0</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5013"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5013/hovercard">#5013</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a></li>
<li>fix(sdk-logs): align LogRecord#setAttribute type with types from
<code>@ opentelemetry/api-logs@0.53.0</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5013"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5013/hovercard">#5013</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a></li>
<li>fix(exporter-<em>-otlp-</em>): fixes a bug where signal-specific
environment variables would not be applied and the trace-specific one
was used instead <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4971"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4971/hovercard">#4971</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/pichlermarc/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/pichlermarc">@ pichlermarc</a>
<ul>
<li>Fixes:
<ul>
<li><code>OTEL_EXPORTER_OTLP_METRICS_COMPRESSION</code></li>
<li><code>OTEL_EXPORTER_OTLP_LOGS_COMPRESSION</code></li>
<li><code>OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE</code></li>
<li><code>OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE</code></li>
<li><code>OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY</code></li>
<li><code>OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY</code></li>
<li><code>OTEL_EXPORTER_OTLP_METRICS_INSECURE</code></li>
<li><code>OTEL_EXPORTER_OTLP_LOGS_INSECURE</code></li>
</ul>
</li>
</ul>
</li>
<li>fix(sdk-node): use warn instead of error on unknown
OTEL_NODE_RESOURCE_DETECTORS values <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5034"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5034/hovercard">#5034</a></li>
<li>fix(exporter-logs-otlp-proto): Use correct config type in Node
constructor</li>
<li>fix(instrumentation-http): Fix instrumentation of
<code>http.get</code>, <code>http.request</code>,
<code>https.get</code>, and <code>https.request</code> when used from
ESM code and imported via the <code>import defaultExport from
'http'</code> style. <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/issues/5024"
data-hovercard-type="issue"
data-hovercard-url="/open-telemetry/opentelemetry-js/issues/5024/hovercard">#5024</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/trentm/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/trentm">@ trentm</a></li>
</ul>
<h3>🏠 (Internal)</h3>
<ul>
<li>
<p>refactor(exporter-prometheus): replace <code>MetricAttributes</code>
and <code>MetricAttributeValues</code> with <code>Attributes</code> and
<code>AttributeValues</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/4993"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/4993/hovercard">#4993</a></p>
</li>
<li>
<p>refactor(browser-detector): replace <code>ResourceAttributes</code>
with <code>Attributes</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5004"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5004/hovercard">#5004</a></p>
</li>
<li>
<p>refactor(sdk-logs): replace <code>ResourceAttributes</code> with
<code>Attributes</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/pull/5005"
data-hovercard-type="pull_request"
data-hovercard-url="/open-telemetry/opentelemetry-js/pull/5005/hovercard">#5005</a>
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/david-luna/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/david-luna">@ david-luna</a></p>
</li>
</ul>
      </li>
    </ul>
from <a
href="https://redirect.github.com/open-telemetry/opentelemetry-js/releases">@opentelemetry/exporter-trace-otlp-http
GitHub release notes</a>
  </details>
</details>

---

> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.

---

**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._

**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJiMjU2ZTBmZC0yZWE3LTQ3YzgtOTBmZi0yNDUyOWZiNWUyNjIiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImIyNTZlMGZkLTJlYTctNDdjOC05MGZmLTI0NTI5ZmI1ZTI2MiJ9fQ=="
width="0" height="0"/>

> - 🧐 [View latest project
report](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17/settings/integration?pkg&#x3D;@opentelemetry/exporter-trace-otlp-http&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@opentelemetry/exporter-trace-otlp-http","from":"0.54.0","to":"0.54.2"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"b256e0fd-2ea7-47c8-90ff-24529fb5e262","prPublicId":"b256e0fd-2ea7-47c8-90ff-24529fb5e262","packageManager":"npm","priorityScoreList":[],"projectPublicId":"12a8a5f5-3e19-438c-8280-eb8f4ee06d17","projectUrl":"https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2024-11-07T13:30:06.896Z"},"vulns":[]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants