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(koa): Adds support to ignore a span by its layer name #2028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MrFabio
Copy link
Contributor

@MrFabio MrFabio commented Mar 20, 2024

Which problem is this PR solving?

  • Adds ignoreLayersName option to instrumentation constructor config to allow layers to be ignored by its name.
  • Currently we have the ignoreLayersType config, this new one will run after this check.
  • It is useful if we want to ignore some layers like logger, allowedMethods, and some ones with no name. It also helps with reducing the number of spans.

Short description of the changes

  • Defines KoaInstrumentationConfig with ignoreLayersName which is an array of string (layer names):
  • Utils module with isLayerNameIgnored to check if a layer should be ignored by the name
  • Modifies _patchLayer to check if the layer is ignored by the config

@MrFabio MrFabio requested a review from a team March 20, 2024 19:36
Copy link

linux-foundation-easycla bot commented Mar 20, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: MrFabio / name: Fábio Gomes (7c75702)

@MrFabio MrFabio force-pushed the feature/koa-ignore branch 3 times, most recently from 4623e18 to 47bed61 Compare March 26, 2024 22:16
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from f41b872 to a5b3a6e Compare April 2, 2024 13:49
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.74%. Comparing base (b043ffb) to head (7c75702).

Files with missing lines Patch % Lines
...lemetry-instrumentation-koa/src/instrumentation.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2028      +/-   ##
==========================================
- Coverage   90.74%   90.74%   -0.01%     
==========================================
  Files         156      156              
  Lines        7728     7736       +8     
  Branches     1590     1594       +4     
==========================================
+ Hits         7013     7020       +7     
- Misses        715      716       +1     
Files with missing lines Coverage Δ
...ode/opentelemetry-instrumentation-koa/src/types.ts 100.00% <ø> (ø)
...ode/opentelemetry-instrumentation-koa/src/utils.ts 100.00% <100.00%> (ø)
...lemetry-instrumentation-koa/src/instrumentation.ts 94.04% <66.66%> (-1.08%) ⬇️

@MrFabio MrFabio force-pushed the feature/koa-ignore branch 8 times, most recently from 882914e to 57512e3 Compare April 6, 2024 13:55
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from 8e3b4df to fe52615 Compare May 9, 2024 14:11
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 4 times, most recently from f0e8dd2 to e2b7711 Compare May 21, 2024 21:38
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from ff73355 to 1dce93d Compare May 24, 2024 10:31
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from 882121f to f7565e7 Compare June 4, 2024 15:02
Copy link
Contributor

github-actions bot commented Jul 6, 2024

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from 2f702fb to 6485e10 Compare July 16, 2024 21:10
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from e4e0e7c to c132a4c Compare July 23, 2024 16:09
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from 902a2d0 to ab7bb45 Compare August 5, 2024 18:40
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 2 times, most recently from fcfec9d to e3a27cd Compare August 19, 2024 16:37
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 3 times, most recently from 660ff76 to 00dd770 Compare August 28, 2024 09:15
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 3 times, most recently from 6857b55 to 6202add Compare September 9, 2024 09:41
@MrFabio MrFabio requested a review from a team as a code owner September 25, 2024 18:22
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 3 times, most recently from 8e7b8fd to e36ad25 Compare October 5, 2024 10:17
@MrFabio MrFabio force-pushed the feature/koa-ignore branch 5 times, most recently from c2fbe23 to 4966650 Compare October 14, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:instrumentation-koa pkg-status:unmaintained:autoclose-scheduled pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant