Skip to content

feat: adding Koa instrumentation#144

Merged
obecny merged 16 commits into
open-telemetry:masterfrom
carolinee21:master
Aug 18, 2020
Merged

feat: adding Koa instrumentation#144
obecny merged 16 commits into
open-telemetry:masterfrom
carolinee21:master

Conversation

@carolinee21

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Short description of the changes

  • This instrumentation adds traces to middleware for both the Koa core and Koa Router modules.

  • Some example traces are shown here: Example Koa Instrumentation in Zipkin

  • User friendly example code is also added under examples/koa

@carolinee21 carolinee21 requested a review from a team July 17, 2020 15:39
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 17, 2020

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 17, 2020

Copy link
Copy Markdown

Codecov Report

Merging #144 into master will increase coverage by 0.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   94.31%   94.61%   +0.29%     
==========================================
  Files          77       84       +7     
  Lines        3836     4124     +288     
  Branches      415      432      +17     
==========================================
+ Hits         3618     3902     +284     
- Misses        218      222       +4     
Impacted Files Coverage Δ
.../node/opentelemetry-koa-instrumentation/src/koa.ts 98.00% <0.00%> (ø)
...e/opentelemetry-koa-instrumentation/src/version.ts 100.00% <0.00%> (ø)
...opentelemetry-koa-instrumentation/test/koa.test.ts 99.08% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/src/types.ts 100.00% <0.00%> (ø)
...emetry-koa-instrumentation/test/koa-router.test.ts 99.09% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/.eslintrc.js 0.00% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/src/utils.ts 100.00% <0.00%> (ø)

chore: add tslint

chore: add standard license

chore: add npmignore

chore: initial package config

docs: initial README

chore: create initial structure

chore: adds traces to Application.use method itself (on instantiation)

feat: traces for app.use

chore: update typescript version

chore: return original layer result

chore: remove app.use span based on design

chore: refactor span attribute assignments into util

chore: add router types

feat: added tracing for koa-router functions and routes

feat: don't create koa spans without root span

feat: added base tests for Koa core and Koa router

chore: finalizing plugin

feat: added kLayerPatched check

test: creating example code for Koa plugin

chore: cleaning up code

chore: update README

chore: update README

chore: update README

chore: add async middleware tests

chore: improve sample code

Add files via upload

Add files via upload

Add files via upload

chore: add jaeger example

Add files via upload

chore: add linter to example code

chore: rename plugin to instrumentation

chore: cleaning tests/examples

Add files via upload

Add files via upload

chore: fix async example code and span timing

chore: refine test style

docs: add comments to plugin patching operations

chore: file cleanup

chore: fix code style
@mayurkale22 mayurkale22 requested a review from a team July 17, 2020 17:31
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/types.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/utils.ts
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/types.ts Outdated
carolinee21 and others added 2 commits July 20, 2020 06:38
Comment thread examples/koa/package.json Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/types.ts Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/types.ts Outdated
@carolinee21 carolinee21 requested review from dyladan and vmarchaud July 24, 2020 19:58
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts Outdated
@carolinee21 carolinee21 changed the title Adding Koa Instrumentation feat: adding Koa instrumentation Jul 29, 2020
Comment thread plugins/node/opentelemetry-koa-instrumentation/src/koa.ts
Comment thread plugins/node/opentelemetry-koa-instrumentation/package.json Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/package.json Outdated

@dyladan dyladan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump all core dependencies to 0.12.2

Comment thread examples/koa/package.json Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/package.json Outdated

@obecny obecny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump all core dependencies to 0.12.2

I think @dyladan meant 0.10.2

Comment thread examples/koa/package.json Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/package.json Outdated
Comment thread plugins/node/opentelemetry-koa-instrumentation/test/koa.test.ts
Comment thread plugins/node/opentelemetry-koa-instrumentation/package.json
@carolinee21 carolinee21 requested a review from dyladan August 10, 2020 18:08
@carolinee21

Copy link
Copy Markdown
Contributor Author

@dyladan @obecny @michaelgoin Now that the other PR has been merged, this one is unblocked and should be ready to go!

@obecny

obecny commented Aug 10, 2020

Copy link
Copy Markdown
Member

@dyladan @obecny @michaelgoin Now that the other PR has been merged, this one is unblocked and should be ready to go!

@dyladan requested changes, wait for him to approve first

@carolinee21

Copy link
Copy Markdown
Contributor Author

@dyladan Hi Daniel! Please let me know if there's anything else missing from me on this or the Hapi PR. Thanks! :)

@obecny obecny merged commit 17005e4 into open-telemetry:master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin for Koa

6 participants